[go: up one dir, main page]

0% found this document useful (0 votes)
86 views3 pages

DSA Question Bank

Question bank

Uploaded by

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

DSA Question Bank

Question bank

Uploaded by

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

JAIPUR ENGINEERING COLLEGE AND RESEARCH CENTRE

Department of Computer Science & Engineering


SUBJECT: Data Structure and Algorithm
Question Bank

1. List the application of stacks.


2. Write down the recursive algorithm to solve tower of Hanoi problem.
3. Translate infix expression into its equivalent postfix expression.
a. (A-B)*(D/E)
b. (A+B↑D)/(E-F)+G
c. A*(B+C*D)+E
d. A*B↑C+D
4. Write down the algorithm to implement stack using linked list.
5. Define ADT (Abstract Data Type)
6. Define data structure. Write down any two application of data structure.
7. Differentiate between linear and non linear data structure.
8. Explain the following terms
a. Infix expression b. prefix expression c. postfix expression
9. Write algorithm to perform the following stack operations.
a. PUSH b. POP c. stack empty d. stack full e. display
10. Transform the following into infix
a. +*ABC b. ABC*+ c. ABC↑ d. ABC*+DE/F*-
11. Evaluate the following postfix expressions
a. 987*+ b. 7 6 +4 *4 10 - ↑5+
12. Define Queue? How it differs from Stack.
13. Differentiate between normal queue and circular queue.
14. Explain Array. Describe the storage structure of Array. Also explain various types of array in
detail.
15. Define Data Structure. Explain various types of data structures in detail.
16. Explain double ended queue and its operations.
17. Explain Linked List? How many types of linked lists exist.
18. Explain Queue implementation using Linked List?
19. How does a Circular Queue differ from Simple queue?
20. Explain Dequeue.Write Algorithm to implement Deque.
21. Explain priority Queue.
22. Mention a few applications of Queue?
23. Differentiate between singly and doubly linked lists?
24. Describe queue operation?
25. Write an algorithm to implement Queue?(Enqueue, Dequeue)
26. Demonstrate representation of Polynomial using array data structure.
27. Apply binary search to find 123 in a list.
49,98,101,123,149,194,199,211,240,286,840,930 (12 data)
28. Write an algorithm to delete a data key from a Threaded binary tree.
29. Is there any difference between threaded and unthreaded binary tree? What is B tree?
Explain.
30. Insert the following data keys in an AVL tree.
16,23,9,163,64,29,73,83,90,96 (10 keys)
31. Compare Binary Search and Sequential Search.
32. Convert (a+(b*(c-d)+(e)-(f*g))) into postfix notation.
33. Demonstrate the Tower of Hanoi problem for m=4 disks. Show the steps of finding the
movement of disks.
34. Define the concept of balanced tree. Write pseudo code for insertion and deletion from
AVL tree.
35. Compute the post fix equivalent of the following expression.
3 * log(x+1) - a/2 GATE CSE
(1998)
36. The following postfix expression with single digit operands is evaluated using a stack: 8
2 3 ^ / 2 3 * + 5 1 * - Note that ^ is the exponentiation operator. What is the top two
elements of the stack after the first * is evaluated. GATE
CSE (2007)
37. What value would the following function return for the input x = 95? GATE CSE
(1998)
function fun (x:integer):integer;
Begin
If x > 100 then fun : x – 10
Else fun : fun(fun (x + 11))
End;
38. The sequence of operations is performed on stack: GATE CSE (1991)
39. PUSH (10),PUSH (20),POP,PUSH (10),PUSH (20),POP,POP,POP,PUSH (20),POP
What is the sequence of the value popped out .
40. Define the following binary tree.
i) Complete binary tree
ii) Strictly binary tree
41. By taking suitable example explain the principle of operation of Heap Sort.
42. Explain the operation of Doubly Linked List.
43. Use Prim’s algorithm to find minimum spanning tree for following graph

44. Write short note on


DFS Traversal Algorithm
BFS Traversal Algorithm
45. Suppose the following sequence list of nodes of Binary tree T in preorder and inorder
respectively.
Preorder: G,B,Q,A,C,K,F,P,D,E,R,H
Inorder: Q,B,K,C,F,A,G,P,E,D,H,R
46. Insert the following list of elements in AVL tree. 3,5,11,8,4,1,12,7,2,6,10
47. Sort the following data in ascending order using Quick Sort 9,4,12,6,5,10,7
48. Name the Data Structure used in BFS and DFS of a graph.
49. A hash table contains 10 buckets and uses linear probing to resolve collisions. The key values are
integers and the hash function used is key % 10. If the values 43, 165, 62, 123, 142 are inserted in
the table, in what location would the key value 142 be inserted? (GATE CSE 2005)
50. Write the advantage of chained hash table (external hashing) over the open addressing scheme.
(GATE CSE 1996)

You might also like