What is the time complexity of multiplying two matrices of order x×y and y×z?
The time complexity of Kruskal's algorithm is _____. (V-vertices, E-edges)
Which of the following are non-primitive data structures?
The given array has 100 elements in ascending order. How many iterations will be performed using the bubble sort algorithm to sort the array?
To implement Dijkstra's shortest path algorithm on unweighted graphs so that it runs in linear time, the data structure to be used is:
How to initialize an integer array of size 'n' with a number 'k' (all the elements of the array will be k) ?
The main disadvantage of using a circular linked list is:
What is the time complexity of the following dynamic programming implementation of the longest common subsequence problem where the length of one string is 'm' and the length of the other string is 'n'?
Consider the following recursive implementation to find the factorial of a number:
int fact(int m)
{
if(m == 0)
return 1;
return m * fact(m - 1);
}
int main()
{
int m = 5;
int ans = fact(m);
printf("%d",ans);
return 0;
}
Suppose we have an O(n) time algorithm that finds the median of an unsorted array. Now consider a QuickSort implementation where we first find the median using the above algorithm, then use the median as a pivot. What will be the worst-case time complexity of this modified QuickSort?
OnSite
1 Openings
FullTime
Posted 17 days ago