Professional Documents
Culture Documents
UNIT II
1. Write a C++ program to explain the concept of inheritance by considering an
example of vehicle.
2.
3.
4.
5.
6.
7.
8.
UNIT III
1. Define singly linked list. Explain the various operations of singly linked list with
algorithm.
2. Explain push and pop operations of stack.
3. Explain enqueue and dequeue with example.
4. Write a C ++ program to implement Stack using linked list.
5. Write a C ++ program to implement List ADT.
6. Write a C ++ program to implement Queue using linked list.
7. Convert the expression ((A + B) * C - (D - E) ^ (F + G)) to equivalent Prefix and
postfix notations.
8. Explain the process of conversion from infix expression to postfix using stack.
9. Write a pseudocode for insertion and deletion operations of stack.
10. Write a pseudocode for inserting an element in a linked list.
UNIT IV
1. Discuss the different methods of traversing a binary tree with algorithm.
2. Traverse the tree given below using Inorder, Preorder and Postorder traversals.
3.
4.
5.
6.
7.
8.
Explain breadth first search and depth first search with an example.
Difference between breadth first search and depth first search.
Explain the algorithm for depth first search and breadth first search with the
following graph.
Explain binary search tree with an example.
Write a C++ program to implement binary search tree.
Explain the procedure for deleting the following elements in the tree.
i.
38
ii.
83
iii.
53
UNIT V
1.
2.
3.
4.
5.
6.
Describe divide and conquer technique with the help of merge sort.
Explain the algorithm of Quick sort by sorting the following set of numbers as an
example. 42 47 52 57 62 37 32 27 22
Explain linear search and binary search with example.
Write a C++ program to implement quick sort.
Explain insertion sort with an example.
Sort the following list with merge sort and insertion sort
8, 3, 25, 6, 10, 17, 1, 2, 18, 5