DS MID-II QUESTION BANK
DS MID-II QUESTION BANK
DS MID-II QUESTION BANK
(AUTONOMOUS)
(Regulations: CMRCET-R22)
21. Create a B-Tree of order 3 from the following lists of data items: 1,2,3,4,5,6,7
24. In how many ways, can you represent a graph in a computer memory? Which one is advantageous
and why?
27. Construct the initial max heap of the following array 32, 15, 20,30,12,25,16
28. What are the applications of pattern matching algorithms?
29. Which pattern matching technique is best among Brute-Force, KMP and Boyer-Moore? Give
your reason
30. Differentiate between standard tries and compressed tries
31. What is tree data structure how many types are there?
32. Explain Types of binary tree ?
33. What is binary search tree .
34. What is directed, undirnected, mixed graph explain
35. What is the difference between Adjacency Matrix and Adjacency List explain?
36. Write the difference between heap and merge sort?
37. Define patterm matching
38. Write about boyer moore matching algorithmn
39. List out the steps involved in deleting a node from a binary search tree.
40. What are the rotations of AVL trees?
41. Write the properties of red-black trees.
42. Define complete binary tree?
43. Write the steps involved in BFS.
44. What is the various representation of a graph?
45. What is LPS?
46. Explain memory representation of compressed tries
47. List out steps in KMP?
48. Create a binary search tree for the following numbers start from an empty binary search tree.
45,26,10,60,70,30,40. Delete keys 10,60 and 45 one after the other and show the trees at each stage.
49. a) Explain Splay-trees with neat diagram.
b) Explain B+ trees and its operations.
50. a) Write and perform heap sort algorithm for 10 15 6 2 25 18 16 2 20 4.
b) Discuss how to represent graph storage using Adjacency list.
51. Write and explain the depth-first search traversal algorithm with an example.
Page 2 of 4
52. Solve the Knuth Morris-Pratt algorithm for the following:
Text: HEREISASIMPLEEXAMPLE
Pattern: EXAMPLE.
53. a) How Compressed Tries Work? Explain its operations with an example.
b) Explain Standard Tries with an example.
54. Construct AVL Tree for the following sequence of numbers- 50, 20, 60, 10, 8, 15, 32, 46, 11
55. Create a RED BLACK Tree by inserting following sequence of elements 8,18,5,15,17,25,40
56. Write the C Program to implement the merge sort technique.
57. Consider the following graph which marks the order in which the nodes would be discovered
by traversing in BFS
58. Explain KMP matcher and find the occurrence of ‘Pattern’ in given Text
63. Sort out following elements by using quick sort technique and write a function for the same.
54,26.9317,77,31,44, 55,20
64. Explain KMP algorithm with an example.
65. Explain the types of tries each with an example.
66. Write a c program to find the height of a binary tree
Page 3 of 4
67. Write a c program to implement AVL tree create, delete & traversal?
68. Explain about DFS & BFS
69. Discuss about heap sort algorithm with an example 1,2,5,9,10,15
70. Perform Knuth-Morris-Pratt algorithm(KMP )
Text: B A D B A B A BA B A D A A B Pattern: A B A B A D A
71. Explain about brute force pattern matching algorithm with an example?
76. Analyze the position of pattern from given text using KMP algorithm
Text: abc abc bab abc dabcdabde pattern: abcdabd
77. S= {ball, box, bomb, basket, start, stop, stock} construct compressed tries from the standard tries.
78. Draw the B-tree of order 3 created by inserting the following data arriving in sequence –
92,24,6,7,11,8,22,4,5,16,19,20,78
Page 4 of 4