Wednesday, January 6, 2010

Practice set for Data Structures


Q.1)Which of the following sorting algorithm has the worst time complexity of (n logn)?
  A)Heap Sort           B)Quick Sort                  C)Insertion Sort              D)Selection Sort

Q.2)Which of the following algorithms solves the all-pair shortest path problem?
  A)Dijkstra's Algorithm   B)Floyd's Algo   C)Prim's    D)Warshall's

Q.3)The way a card game player arranges his cards as he picks them up one by one,is an example of 
  A)bubble Sort    B)Selection Sort    C)insertion sort    D)merge Sort

Q.4)You are asked to sort 15 randomly generated numbers.you should prefer
   A)bubble sort   B)Quick Sort  C)merge Sort   D)Heap Sort



ANSWERS:1-a
                    2-b
                    3-c
                    4-a

0 comments:

Post a Comment

visitors count

Blog Ads