Explain stack as an ADT. Explain algorithm to convert an infix expression to postfix using stack? Use this algorithm to convert (A+B) * (C–D) to postfix expression.
What is linked list? Compare singly linked list with doubly linked list. How do you insert and delete nodes in a singly linked list?
Explain breadth first search (BFS) algorithm. Show each step of this algorithm to traverse the graph given below.
Attempt any Eight questions
[8x5=40]What is asymptotic analysis? Explain big oh notation with example.
Explain primitive queue operations. What are different applications of queue?
Define recursion. Compare recursion with iteration. Write a recursive function to implement factorial.
Trace bubble sort algorithm with array of numbers 37, 88, 16, 55, 10, 32, 23, 66, and 17.
Define hashing. Explain collision and collision resolution in hashing.
What is binary tree? Explain binary search tree with example.
Write a program to implement binary search.
Define spanning tree. Explain minimum spanning tree with example.
Write short notes on:
a) Abstract data type
b) Stack as linked list