Programming & DS Rapid Quiz -3 (App update required to attempt this test)
Attempt now to get your rank among 636 students!
Question 1
Question 2
While(tempdata!=y)
{
q=temp;
temp=tempnext;
}
Assume every aspect of function insert() is correct, except the while loop. What is wrong with the while loop?
Question 3
5, 12, 3, 15, 4, 6, 10
These elements are inserted into max heap tree using two different methods. In method 1, elements are inserted one by one into heap and heap property is maintained at every step. In method 2, first these elements are stored into an almost complete binary tree and then max-heapify function is executed on it. Now find the number of elements that has different index position into two heaps generated from given two methods _________.
Question 4
F(int *a, int b)
{
if(b==1)
return *a;
else
{
*a = *a + b
return F(a,b-1);
}
}
Main()
{
int x = 4 , y = 7;
int result = F(&x,y);
Print (result);
}
What is the output _______________.
Question 5
In which order the following numbers 7,5,1,8,3 and 2, should be inserted into an an binary search tree to get inorder and preorder traversal sequences as same-
Question 6
Which of the following is a valid topological ordering?
- 636 attempts
- 3 upvotes
- 4 comments