The data structure used in the hierarchical data model is?
What is the auxiliary space complexity of binary insertion sort?
How many sub-arrays does the quick sort algorithm divide the entire array into?
What is the time complexity of insertion sort in the best case?
What does the following recursive function do?
int fun(int x, int y)
{
if (y == 0) return 0;
return (x + fun(x, y-1));
}
You are given infinite coins of denominations 1, 3, and 4. What is the total number of ways to achieve a sum of 7 using these coins, if the order of the coins does not matter?
Consider the code fragment written in C below:
void f(int n)
{
if (n ≤1) {
printf("%d", n);
}
else {
f(n/2);
printf("%d", n%2);
}
}
What does f(173) print?
There are four students in a class - P, Q, R, and S. P claims that a triangle is a bipartite graph. Q claims that a pentagon is a bipartite graph. R claims that a square is a bipartite graph. S claims that a heptagon is a bipartite graph. Which of these students is correct?
How many times is the recursive function my_recursive_function() called when the following code is executed?
void my_recursive_function(int n)
{
if(n == 0)
return;
printf("%d ",n);
my_recursive_function(n-1);
}
int main()
{
my_recursive_function(5);
return 0;
}
OnSite
1 Openings
FullTime
Posted 17 days ago