Académique Documents
Professionnel Documents
Culture Documents
1991
1. The minimum number of comparisons required to sort 5 elements is _____
1992
1993
1. Summation of O(n) over 1<=k<=n where O(n) stands for order n is: (a) O(n) (b) O(n square) (c) O(n cube) (d) O(3 *n square) (e) O(1.5 * n square)
1994
1995
1. Merge sort uses (a) Divide and conquer strategy (b) Backtracking approach (c) Heuristic search (d) Greedy approach
4.Consider the following sequence of numbers 92, 37, 52, 12, 11, 25 Use bubblesort to arrange the sequence in ascending order. Give the sequence at the end of each of the first five passes.
1996
1997
1998
1999
2000
2001
(a) Insert the following keys one by one into a binary search tree in the order specified. 15, 32, 20, 9, 3, 25, 12, 1 Show the final binary search tree after the insertions.
21 [ADA & DS]
2002
6. Draw all binary trees having exactly three nodes labeled A, B and C on which Preorder traversal gives the sequence C,B,A.
2003
4. Let A be a sequence of 8 distinct integers sorted in ascending order. How many distinct pairs of sequences, B and C are there such that (i) each is sorted in ascending order, (ii) B has 5 and C has 3 elements, and (iii) the result of merging B and C gives A? (A) 2 (B) 30 (C) 56 (D) 256
19. Suppose the numbers 7, 5, 1, 8, 3, 6, 0, 9, 4, 2 are inserted in that order into an initially empty binary search tree. The binary search tree uses the usual ordering on natural numbers. What is the in-order traversal sequence of the resultant tree? (A) 7 5 1 0 3 2 4 6 8 9 (B) 0 2 4 3 1 6 5 9 8 7 (C) 0 1 2 3 4 5 6 7 8 9 (D) 9 8 6 4 2 3 0 1 5 7
2004
2005
2006
2007
2008
2009
2010
2011
2012