My Report

Data Structure II Practice 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

1. Recursive insertion sort is a comparison based sort.

2. What is the average time complexity of MSD radix sort (w= bits required to store each key)?

3. There is one small error in the following flip routine. Find out which line it is on.

	1	void flip(int arr[], int i)
	2	{
	3	      int t, init = 0;
	4	      while (init < i)
	5	      {
	6		    t = arr[init];
	7		    arr[i] = arr[init] ;
	8		    arr[i] = t;
	9		    init++;
	10		    i--;
	11	      }
	12	}

4. What is the worst space complexity of bucket sort (k = number of buckets)?

5. What will be the order of elements of the array arr = {23, 67, 143, 654, 43} after first iteration of MSD sort is complete?

6. Which one of the following sorting algorithm requires recursion?

7. Which of the following is an alternate name of MSD radix sort?

8. What is the average case time complexity of permutation sort?

9. LSD radix sort is in-place sorting algorithm.

10. Which of the following function correctly represents odd-even sort?


 

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.