My Report

Data Structure I Mock Test 3


Correct Answer: 2 points | Wrong: -1 point
Grades: A* (100% score) | A (80%-99%) | B (60%-80%) | C (40%-60%) | D (0%-40%)
advertisement
 10%

Question 1 of 10

1. What is the time complexity for inserting/deleting at the beginning of the array?

Question 1 of 10

Question 2 of 10

2. Consider the postfix expression 4 5 6 a b 7 8 a c, where a, b, c are operators. Operator a has higher precedence over operators b and c. Operators b and c are right associative. Then, equivalent infix expression is

Question 2 of 10

Question 3 of 10

3. Select the appropriate code for the recursive Tower of Hanoi problem.(n is the number of disks)

Question 3 of 10

Question 4 of 10

4. What is the time complexity of reversing a word using stack algorithm?

Question 4 of 10

Question 5 of 10

5. Matrix A when multiplied with Matrix C gives the Identity matrix I, what is C?

Question 5 of 10

Question 6 of 10

6. What is the relation between Sparsity and Density of a matrix?

Question 6 of 10

Question 7 of 10

7. Which of the following statement is incorrect with respect to balancing symbols algorithm?

Question 7 of 10

Question 8 of 10

8. How many stacks are required for reversing a word algorithm?

Question 8 of 10

Question 9 of 10

9. What will be the output of the following program?

main()  
{  
   char str[]="san foundry";  
   int len = strlen(str);  
   int i;  
  
   for(i=0;i<len;i++)  
        push(str[i]);  // pushes an element into stack
  
   for(i=0;i<len;i++)  
      pop();  //pops an element from the stack
} 

Question 9 of 10

Question 10 of 10

10. Which of the following is not the method to represent Sparse Matrix?

Question 10 of 10


 

Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.