My Report

Data Structure II Practice Test 2


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. Shell sort is applied on the elements 27 59 49 37 15 90 81 39 and the chosen decreasing sequence of increments is (5,3,1). The result after the first iteration will be

2. Which of the following sorting algorithm is NOT stable?

3. Tim sort begins sorting the given array by using which of the following sorting algorithm?

4. The worst case running time of shell sort, using Shell’s increments is?

5. What will be the output of the given Java code?

import java.util.Arrays; 
public class SortExample 
{ 
	public static void main(String[] args) 
	{ 
		int[] arr = {10,7,9,5,8,4}; 
		Arrays.sort(arr, 1, 3); 
		System.out.printf(Arrays.toString(arr)); 
	} 
} 

6. Introsort algorithm is combination of _____________

7. What is the worst case complexity of QuickSort?

8. Why is Shell sort called as a generalization of Insertion sort?

9. Auxiliary space used by gnome sort is _________

10. Which one of the following is false?


 

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.