Data Structures Practice Questions

The following list provides important Data Structures Practice Questions.

  1. Write a program to implement following operation on one dimensional array (i) Insertion (ii) Deletion (iii) Traversal (iv) Reverse (v) Merge
  2. Create an application to Sort an array (menu driven) using: (i) BUBBLE SORT (ii) MERGE SORT(iii) INSERTION SORT (iv) SELECTION SORT
  3. Write a program to implement a Singly Linked List.
  4. Implement a Circula r Linked Lists
  5. Write a program to implement Doubly Linked Lists
  6. Create a menu driven program to implement (i) Static Stack (ii) Dynamic Stack.
  7. Write a program to implement a (i) Static (ii) Dynamic Circular Queue
  8. Implement a (i) Static (ii) Dynamic De-Queue.
  9. Write a program to implement recursive algorithms for the following operations on Binary Search Tree: 1. Insertion 2. Searching
  10. Implement recursive algorithms for BST traversal- Inorder, Preorder, Postorder.

Advanced Data Structures Practice Questions

  1. Write a program to search & display the location of an element specified by the user, in an array using (i) Linear Search (ii) Binary Search technique.
  2. Create an application to accept a matrix from user, find out matrix is sparse or not and convert into triplex matrix.
  3. Write a program to implement Polynomial addition operation using linked list.
  4. Create a C program to create two linked lists from a given list in following way INPUT List:- I 2 3 4 5 6 7 8 9 I0, OUTPUT:-First List:-  1 3 5 7 9 Second List:- 2 4 6 8 10
  5. Write a program to implement Student Database using Linked List with the following structure: (i) Name (ii) Rollno (iii) Marks of 5 subjects (iv) Average. Result. If the average < 50 then print ‘ Fail’, otherwise  ‘ Pass’
  6. Develop a program to convert Infix to equivalent (i) Prefix expression (ii) Postfix expression
  7. Write a program to evaluate (i) Prefix Expression (ii) Postfix Expression using stack.
  8. Let us assume a Patient’ s coupon generator for the Doctors’ clinic. The patients are given the coupons on first-come- first-serve basis. After the visit of a patient, patient-ID is kept stack-wise. At the end of the day, the count is generated from the stack. Construct a menu-based program for patients’ coupons generator using an appropriate data structure.
  9. Write a program to implement an expression tree. (For example: (a+  b I (c  * d)-  e))

Application Based Data Structures Practice Questions

  1. Sometimes a program requires two stacks containing the same type of items. Suppose two stacks are stored in separate arrays, then  one  stack might overflow while there is considerable unused space in the other. A neat way to avoid this problem is to put all spaces in one stack and let this stack grow from one end of the array, and the other stack starts from the other end and grows in the opposite direction, i.e., toward the first stack. In this way, if one stack turns out to be large and the other small, then they will still both fit, and there will be no overflow until all space is used. Declare a new structure that includes these two stacks and perform various stack operations.

Further Reading

50+ C Programming Interview Questions and Answers

C Program to Find Factorial of a Number

You may also like...