DSA Assignment1
DSA Assignment1
4[M]
2. Illustrate using diagrams what is meant by stack overflow and stack underflow
[6M]
3. Differentiate between prefix and postfix expressions [4M]
4. Define an ADT and identify its major parts [5M]
5. Write a pseudo code to implement the Bubble sort algorithm [6M]
6. Create a binary search tree using the following data entered as a sequential
set:
7. Explain the difference between quicksort and bubblesort. Which one is more
efficient [8M]
8. What is the maximum number of edges in a simple graph with N vertices?
Draw a simple graph with maximum number of edges having four vertices
[6M]
9. Write an algorithm to remove the first and last nodes from a linked list
[8M]
a. Best case
b. Worst case
11. Identify four properties of an algorithm and give a brief description of each.
[4M]
as it sorts the array. Your illustration must show the contents of the array, and
the value of p, after step 1.1, after step 1.2, and after step 1.3. [10M]
13. Given an array of integers, write an algorithm to find the two numbers that
sum to a specific target value. What is the time complexity of your solution?
[8M]
15. What are the advantages of using a linked list over an array? [4M]
16. Explain the concept of recursion and state the advantages and potential
17. Deduce the pre-order, in-order, and post-order sequences of the following
tree:
[6M]
18. List out the steps involved in deleting a node from a binary search tree [6M]