1)Illustrate the operation of Counting-Sort on the array A={6,0,2,0,1,3,4,6,1,3,2}

2)Illustrate the operation of Radix-Sort on the following list of English words: COW,DOG,SEA,RUG,ROW,MOB,RAT,BAT,BAR,EAR,TAR,DIG,BIG,TEA,NOW,FOX}.

3)Illustrate the operation of Bucket Sort on the array A={.81,.09,.13,.61,.43,.23,.98,.60,.75,.41}.

4)Explain how to sort n integers in the range 0 to n^2-1 in O(n) time.

5)Which of the following sorting algorithms are stable: insertion sort,merge sort,heapsort and quicksort? Give a simple scheme that makes any sorting algorithm stable. How much additional time and space does the scheme take?

6)What is the worst-case running time for the bucket-sort algorithm? What simple change to the algorithm preserves its linear expected running time and makes its worst-case running time O(nlgn)?

7)Describe an algorithm that, given n integers in the range 0 to k,preprocesses its input and then answers any query about how many of the n integers fall into a range [a...b] in O(1) time.The algorithm should use THETA(n+k) preprocessing time.

8)When are Radix and Bucket sorts used?

ReplyDeleteHere, are some sample questions based on “Data Structures”. Read it carefully as these questions will improve your basic concept on Data Structures using C programming language, and will help you in cracking any interview.Click on any question to find out it's answers:

Question - 1) What Is Data Structure ?

Question - 2) What Is The Need For Data Structures In Programming ?

Question - 3) What Are The Different Data Types Which A Data Structure May Comprise Of ?

Question - 4) How Can Data Structures Be Classified ?

Question - 5) What Are Linear Data Structures ?

Question - 6) What Are Non Linear Data Structures ?

Question - 7) Differentiate Between Data Types & Data Structures ?

Question - 8) List Four Major Operations On Linear Data Structures ?

Question - 9) What Do You Mean By A Static Data Structure ?

Question - 10) What Is Dynamic Memory Allocation ?

Question - 11) What Is A Stack ?

Question - 12) What Is A Queue ?

Question - 13) What Are Linked Lists ?

Question - 14) What Are Trees ?

Question - 15) What Are Arrays ?