Algorithm: An algorithm is a step-by-step procedure to solve a problem. A good algorithm should be optimized in terms of time and space. Different types of… Read More

# Tag Archives: Algorithms-Misc

Machine Learning is the field of study that gives computers the capability to learn without being explicitly programmed. ML is one of the most exciting… Read More

Pseudo code is a term which is often used in programming and algorithm based fields. It is a methodology that allows the programmer to represent… Read More

Distributed Algorithm is a algorithm that runs on a distributed system. Distributed system is a collection of independent computers that do not share their memory.… Read More

What is the return value of following function for 484? What does it to in general? filter_none edit close play_arrow link brightness_4 code bool fun(int… Read More

You are given an array with even integer elements. You and some other player take turns to pick numbers. Each player can pick either the… Read More

Which of the following is the best possible time complexity to get Nth Fibonacci number with O(1) extra space (A) Time complexity T(n) is T(n-1)… Read More

There are 25 horses among which you need to find out the fastest 3 horses. You can conduct race among at most 5 to find… Read More

In the above question, if array A is made to hold the string “abcde”, which of the above four test cases will be successful in… Read More

The procedure given below is required to find and replace certain characters inside an input character string supplied in array A. The characters to be… Read More

An inversion in a an array A[] is a pair (A[i], A[j]) such that A[i] > A[j] and i < j. An array will have… Read More

Suppose you are given an array s[1…n] and a procedure reverse (s,i,j) which reverses the order of elements in a between positions i and j… Read More

Consider the following C function. filter_none edit close play_arrow link brightness_4 code float f(float x, int y) { float p, s; int i; for (s=1,… Read More

An element in an array X is called a leader if it is greater than all elements to the right of it in X. The… Read More

The minimum number of comparisons required to determine if an integer appears more than n/2 times in a sorted array of n integers is (A)… Read More