[go: up one dir, main page]

0% found this document useful (0 votes)
245 views4 pages

DSA - Question Bank - 2023

This document contains a question bank with multiple choice and short answer questions related to data structures and algorithms. Topics covered include data types vs data structures, linear and non-linear data structures, abstract data types, stacks, queues, searching and sorting algorithms like insertion sort, binary search, asymptotic analysis, recursion, dynamic programming, greedy algorithms and graph algorithms like minimum spanning trees.
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)
245 views4 pages

DSA - Question Bank - 2023

This document contains a question bank with multiple choice and short answer questions related to data structures and algorithms. Topics covered include data types vs data structures, linear and non-linear data structures, abstract data types, stacks, queues, searching and sorting algorithms like insertion sort, binary search, asymptotic analysis, recursion, dynamic programming, greedy algorithms and graph algorithms like minimum spanning trees.
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/ 4

Government Engineering College - Rajkot

Computer Engineering Department


Subject – Data Structure and Algorithms
Question Bank (3134201)

1 Differentiate between data types and data structures.


2 Answer the followings:
(1) Give examples of Linear and Non-Linear Data Structures.
(2) What do you mean by Abstract Data Types?

3 Discuss and write a program to implement queue functions using arrays

4 Distinguish between stack and queue

5 What is top of stack? Why stack is called LIFO list and queue is called FIFO list.

6 What is a circular queue? How do you check the queue full condition? Write an algorithm to count
the nodes in a circular queue.
7 Compare sequential searching with binary searching in detail.

8 Examine the algorithm for Insertion sort and sort the following array: 77, 33, 44, 11, 88, 22, 66, 55

9 What is time complexity? Explain with example

10 Explain malloc and free functions in ‘C’. Also discuss advantages of dynamic over static memory
allocation.
11 Discuss an algorithm for infix to postfix conversion with example

12 Write an algorithm to evaluate postfix expression. Explain working of the algorithm using
appropriate example.
13 Write a ‘C’ program to reverse a string using stack

14 Write algorithm to (i) insert, and (ii) delete elements in circular queue

15 Explain primitive and Non-primitive data types in detail.

16 Explain Binary Search with example

17 Explain Asymptotic Notations in detail.

18 Differentiate: Static and Dynamic Memory Allocation

19 Explain linear and Non-linear data structure with example.

20 What is stack? Explain operations on stack in detail.


21 What is queue? Explain operations on queue in detail.

22 Explain advantages of circular queue over Simple queue

23 Explain Tower Of Hanoi with example.

24 Describe the algorithm for Evaluating postfix expression and Evaluate the following postfix
expression in tabular form: 3 5 * 6 2 / +.
25 Explain Dequeue and Priority queue in detail.

26 State whether the statements are correct or incorrect with reasons.


1. O(f(n)) + O(f(n)) = O (2f(n))
2. If 3n + 5 = O(n2) , then 3n + 5 = o(n2)
27 Explain asymptotic analysis with all the notations and its mathematical inequalities.

28 Perform the analysis of a recurrence relation T(n)= 2𝑇 (n/2)+ 𝜃(𝑛2) by drawing its recurrence tree.

29 “A greedy strategy will work for fractional Knapsack problem but not for 0/1", is this true or false?
Explain.
30 Explain the steps of greedy strategy for solving a problem.

31 Write greedy fractional knapsack algorithm.

32 Explain why analysis of algorithms is important? Explain: Worst Case, Best Case and Average
Case Complexity with suitable example.
33 Write and analyze an insertion sort algorithm to arrange n items into ascending order.

34 Explain Binomial Coefficient algorithm using dynamic programming.

35 Compare Dynamic Programming Technique with Greedy Algorithms

36 Give the characteristics of Greedy Algorithms.

37 Using greedy algorithm find an optimal schedule for following jobs with n=7 profits: (P1, P2, P3,
P4, P5, P6, P7) = (3, 5, 18, 20, 6, 1, 38) and deadline (d1, d2, d3, d4, d5, d6, d7) = (1, 3, 3, 4, 1, 2,
1)
38 What is asymptotic notation? Find out big-oh notation of the f(n)= 3n2+5n+10.

39 Write iterative and recursive algorithm for finding the factorial of N. Derive the time complexity of
both algorithms.
40 Solve following recurrence relation using iterative method T(n)=2T(n / 2) + n

41 Explain master theorem and solve the recurrence T(n)=9T(n/3)+n with master method

42 What is principal of optimality? Explain its use in Dynamic Programming Method.


43 Analyse time complexity of insertion algorithm.

44 Apply greedy algorithm and find optimal sequence of jobs. Given Profits = {40, 80, 50, 30, 20} and
deadlines = {3, 2, 2, 1, 3}
45 Apply Kruskal’s algorithm and find minimum spanning tree from given graphs

47 Find minimum spanning tree for the given graph using prim’s algorithm

You might also like