How many times is the main loop in the Bellman-Ford algorithm executed?
The data structure used in the standard implementation of Breadth-First Search (BFS) is?
What are the optimal number of multiplications required to multiply the following 3 matrices? A(10, 20), B(20, 40), C(40, 80)
What is the base case in the Merge Sort algorithm when it is solved recursively?
Consider the following array of elements. 〈89, 19, 50, 17, 12, 15, 2, 5, 7, 11, 6, 9, 100〉. The minimum number of interchanges needed to convert it into a max-heap is
The Depth First Search is unique when the graph is a Linked List.
The recurrence relation that describes the time complexity of binary search is:
Given a recursive and an iterative algorithm to perform the same task, which algorithm will generally be more optimal in terms of memory usage?
Which of the given options provides the increasing order of asymptotic complexity of functions f1, f2, f3, and f4?
f1(n) = 2^n
f2(n) = n^(3/2)
f3(n) = n log n
f4(n) = n^(log n)
Predict the output of the following program:
#include <stdio.h>
int f(int n)
{
if (n <= 1)
return 1;
if (n % 2 == 0)
return f(n/2);
return f(n/2) + f(n/2 + 1);
}
int main()
{
printf("%d", f(11));
return 0;
}
OnSite
1 Openings
FullTime
Posted 17 days ago