• Register

Recent posts tagged algorithm

27 2 2 min.
In computer science, divide and conquer is often a solving problem approach where we divide the info set in to parts then combine the sub-part to urge the answer to the most data set. for instance quick-sort, merger-sort and binary search.On the othe...
posted 5 days ago mhfaisal 262 points
6 0 1 min.
Algorithm for sorting numbers in ascending order Let the values be store in an array "a" Let n = a.length for ( i = 0 ; i < n ; i ++ ) { // Find array element with min. value among a[i], a[i+1], ..., a[n-1] ...
posted May 22 Sanjana Sagar 427 points
3 0 2 min.
Explanation of the problemGiven a set of numbers, we have to find the number of subsets that sum to a particular value. This is one among the classic problems. the thought is to seek out the amount of possible sums with the present number. And its tr...
posted May 19 mhfaisal 262 points
0 0 4 min.
Programming data structures and algorithms using python The knowledge of Data Structures and Algorithms forms the base to identify programmers giving yet another reason for tech enthusiasts to get a Python Certification. While data structur...
posted May 19 Sanjana Sagar 427 points
0 0 2 min.
Difference between dijkstra and bellman ford algorithmThe primary contrast between Dijkstra's calculation and Bellman Ford's calculation is Negative Cycle Detection. Bellman-Ford can track down the negative cycle though Dijkstra can...
posted May 18 amna 112,545 points
0 0 3 min.
If the system does not use a deadlock prevention or remediation algorithm , a deadlock situation may occur. In this case-Apply an algorithm to check the system state to determine if a deadlock has occurred or not.Ap...
posted May 17 amna 112,545 points
3 3 2 min.
What is O(log n)Logarithmic time period ( O(log n) ) essentially means the time period grows in proportion to the logarithm of the input size - as an example, if 10 items takes at the most some amount of your time x , and 100 items takes at the most ...
posted May 10 mhfaisal 262 points
3 0 2 min.
Explanation of the algorithmLet you have a collection of numbers with the size of  n elements identified by an array or list myCollection. You have to find the largest value and the smallest value of the collection.First initialize two variables...
posted May 6 mhfaisal 262 points
3 1 1 min.
Explanation of the algorithmThe formula of finding average of a sequence is defiend as:avg = sum / countwhere sum = Sum of the elements in the sequence  and count = number of the elements in the sequence.Hence all integers in a closed interval [...
posted May 4 mhfaisal 262 points
0 0 3 min.
Algorithm and flowchart are two types of tools for explaining the process of a program. In this article, I'll explain what an algorithm and a flowchart are, the differences between them, and how to create a flowchart to visualize the algorithm. A...
posted Feb 12 amna 112,545 points
0 0 3 min.
Click Here For Part 1Q46. Which of the following translates and executes instructions in a programming language? A. A compiler B. A text editor C. A loader D. An interpreterAnswer:An interpreterQ47. The following pseudocode algorithm has an error. Th...
posted Jan 21 Lalit Kumar 1,240 points
0 0 9 min.
Q1. Which of the following characteristics relates to the term algorithm?Answer:A set of rules and procedures-usually mathematical in nature-that can define how the encryption and decryption processes operateQ2. Which type of symmetric algorithm oper...
posted Jan 21 Lalit Kumar 1,240 points
0 0 10 min.
Q1. Which of the following provides a visual representation of the patterns of an algorithm? a) Flow analysis b) Flowchart c) Pseudocode d) Gantt chartAnswers:FlowchatQ2. If using the MD5 hashing algorithm, what is the length to which each message is...
posted Jan 21 Lalit Kumar 1,240 points
0 0 7 min.
1. How Bubble Sort works?Bubble Sort is based on the idea of repeatedly comparing pairs of adjacent elements and then swapping their positions if they are in the wrong order. Bubble sort is a stable, in-place sort algorithm.How it works:In an unsorte...
posted Nov 30, 2020 Lalit Kumar 1,240 points
0 0 2 min.
Summary: show how to obtain the least common multiple in C; that is, calculate the LCM of two numbers in C.Table of contents:The algorithm, or rather: the formula.Least common multiple in C.Putting it all together.Remember that th...
posted Oct 4, 2020 amna 112,545 points
0 0 4 min.
In this post I will show you how to get pi or calculate pi using the Leibniz series in the C programming language . While this is for C, it can work for C ++ as well.Table of contents:The number of iterationsFunction to calculate pi in C using Leibni...
posted Oct 3, 2020 amna 112,545 points
0 0 3 min.
In this article I will show you a very simple programming exercise for starters. It is about printing a triangle of asterisks in the C programming language.Table of contents:Explanation of the algorithm.Triangle of asterisks in C.Inverse triangl...
posted Oct 3, 2020 amna 112,545 points
17 0 4 min.
A simple algorithm explained for the calculation of algorithms of any integer base.We know that math.h library offers us an extensive number of functions for mathematical calculations. This is the case of the functions to calculate logarithms. The fu...
posted Sep 16, 2020 amna 112,545 points
To see more, click for the full list of questions or popular tags.