What is the worst-case time complexity of the quicksort algorithm?
What is the GCD (Greatest Common Divisor) of i and j?
What is randomized quicksort?
Consider the following undirected graph G:

Choose a value of x that will maximize the number of minimum weight spanning trees (MWSTs) of G. The number of MWSTs of G for this value of x is
The Floyd-Warshall algorithm for all-pair shortest paths computation is based on:
An array of 25 distinct elements is to be sorted using quicksort. Assume that the pivot element is chosen uniformly at random. The probability that the pivot element gets placed in the worst possible location in the first round of partitioning (rounded off to 2 decimal places) is
Suppose we are sorting an array of eight integers using heapsort, and we have just finished some heapify (either max heapify or min heapify) operations. The array now looks like this:
16 14 15 10 12 27 28
How many heapify operations have been performed on the root of the heap?
Which of the following conditions is sufficient to detect a cycle in a directed graph?
Consider the following C program:
int main()
{
int x, y, m, n;
scanf ("%d %d", &x, &y);
/* x > 0 and y > 0 */
m = x; n = y;
while (m != n)
{
if(m>n)
m = m - n;
else
n = n - m;
}
printf("%d", n);
}
What does the program compute?
Insertion sort is preferred over other sorting algorithms (like selection sort, bubble sort, etc.) for introsort implementation because it is faster and adaptive.
OnSite
1 Openings
FullTime
Posted 17 days ago