0% found this document useful (0 votes)
15 views2 pages

DSA Assignment1

The document contains a series of questions related to data structures and algorithms, covering topics such as graph applications, stack operations, expression types, abstract data types (ADTs), sorting algorithms, binary search trees, algorithm analysis, and linked lists. It includes requests for pseudo code, diagrams, and explanations of various concepts, as well as practical tasks like implementing sorting algorithms and finding specific values in arrays. The questions are designed to assess understanding and application of fundamental computer science principles.

Uploaded by

pchingwaru544
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views2 pages

DSA Assignment1

The document contains a series of questions related to data structures and algorithms, covering topics such as graph applications, stack operations, expression types, abstract data types (ADTs), sorting algorithms, binary search trees, algorithm analysis, and linked lists. It includes requests for pseudo code, diagrams, and explanations of various concepts, as well as practical tasks like implementing sorting algorithms and finding specific values in arrays. The questions are designed to assess understanding and application of fundamental computer science principles.

Uploaded by

pchingwaru544
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

1. What are some of the applications of the graph data structure?

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:

13, 19, 57, 68, 48, 39, 25, 11, 5 [6M]

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]

10. Explain the following terms as used in algorithms analysis:

a. Best case

b. Worst case

c. Average case [6M]

11. Identify four properties of an algorithm and give a brief description of each.

[4M]

12. Given the following data in an unsorted array.

You are required to implement a quick-sort algorithm. Illustrate its behaviour

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]

14. Use an example to explain hashing [6M]

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

pitfalls of using recursion in algorithms [6M]

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]

You might also like