Explore topic-wise InterviewSolutions in .

This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your knowledge and support exam preparation. Choose a topic below to get started.

1.

Which is the correct order of the following algorithms with respect to their time Complexity in the best case ?(A) Merge sort > Quick sort >Insertion sort > selection sort(B) insertion sort < Quick sort < Merge sort < selection sort(C) Merge sort > selection sort > quick sort > insertion sort(D) Merge sort > Quick sort > selection sort > insertion sort

Answer» None
2.

Consider an array of elements arr[5]= {5,4,3,2,1} , what are the steps of insertions done while doing insertion sort in the array.(A) 4 5 3 2 13 4 5 2 12 3 4 5 11 2 3 4 5(B) 5 4 3 1 25 4 1 2 35 1 2 3 41 2 3 4 5(C) 4 3 2 1 53 2 1 5 42 1 5 4 31 5 4 3 2(D) 4 5 3 2 12 3 4 5 13 4 5 2 11 2 3 4 5

Answer»
3.

Consider the array A[]= {6,4,8,1,3} apply the insertion sort to sort the array . Consider the cost associated with each sort is 25 rupees , what is the total cost of the insertion sort when element 1 reaches the first position of the array ?(A) 50(B) 25(C) 75(D) 100

Answer»