DS QUESTION BANK
MODULE-1Introduction To DS
1) Define D.S
2) How do you classify D.S?
3) What are primitive D.S?give example
4) What are non-primitive D.S?give example
5) What are linear D.S?give example
6) What are non-linear D.S?give example
7) What are the common operations on non-primitive D.S?
8) What is the time complexity of an algorithm?
9) What is the space complexity of an algorithm?
10) List out the primitive operations performed on the strings.
11) What are operations on string?
MODULE-2 Dynamic Memory Allocation
1)Give the meaning of each of the following statements
a)int a;
b)int *p;
c)p=&a;
d)printf(“%d”,*p);
2)What is the purpose of the following two statements
a)int x;
int *px=&x;
b)int x=100,y;
int *p;
p=&x;
y=*p;
3)Define static memory allocation.
4)Define dynamic memory allocation.
5)What is the purpose of using malloc(),calloc(),realloc(),free()?write the syntax of all
6)What are the advantages of pointers.
7)Difference between static and dynamic memory allocation.
MODULE-3 Recursion
1)Define Recursion.
2)Write the advantages of recursion.
3)Write a program for finding GCD of numbers using recursion.
4) Write a program for generates Fibonacci of n using recursion.
Module 4: SEARCHING
1. Differentiate between linear search and binary search.
2. What are the advantages and disadvantages of linear and binary search?
3. What are the advantages and disadvantages of binary search?
4. Write a program on linear search.
5. Write an algorithm for binary search function.
6. Write a program for binary search using recursive methods.
MODULE-5 SORTING
1) What is sorting? List any five sorting methods.
2) Apply bubble sort technique to the following list of number and explain each step 10,4,1,15,0,9.
3) Write an algorithm and program to sort n elements using merge sort method.
4) Write a program to sort n elements using insertion sort method.
5) Write a program to sort n elements using selection sort method.
10-MARKS
1)Write a program for the following.
a)Bubble sort
b)Selection sort
c)Insertion sort
d)Quick sort
e)Merge sort
MODULE-6 STACK
1) Define STACK
2) Array representation of STACK
3) List and explain briefly the basic operations on STACK
4) Applications of STACK
5) Consider the infix expression a+b*c. convert this into prefix and postfix.
6) Translate the below expression to prefix
a. (A+B)((D-E)*F+G)
b. (A+B)*(A-B)
7) Write a program on STACK to perform PUSH, POP and DISPLAY function
8) Write an algorithm for on STACK to perform PUSH, POP and DISPLAY function
9) Diagrammatically represent various an empty stack, overflow, push, pop and underflow of the stack.
10) Write a C program to illustrate stack program.
11) Diagrammatically represent and explain 1) Empty stack, 2) Stack Overflow, 3) Stack Underflow.
12) i)Define STACK ii) Array representation of STACK iii) Operations on STACK
MODULE-7 QUEUE
1) Define Queue.
2) List different types of queue.
3) What are the operations that can be performed on queue?
4) Define De-queue. List its types explain along with representation
5) What is circular queue?
6) Define degree and depth of the node.
7) What is priority queue? List its types and explain along with its representation
8) Write applications of queue.
9) Illustrate the circular Queue with neat diagram then trace it for n=4 inert 13,89,12,78 then remove 13, then insert 33, 45
10) Write a program to demonstrate insert, delete and display operation on simple Queue
11) With an example demonstrate how a queue can be represented using array.
MODULE-8 Linked List
1. Define linked list.
2. Which are the two components of linked list?
3. List different types of linked list and explain any two
4. Show with the diagram of Singly Linked List with three nodes.
5. Write applications of linked list.
6. Show with a neat diagram a linked list of 3 nodes.
7. What are different operations possible on linked list?
8. List advantages and disadvantages of linked list.
9. Write a program to create node and display linked list
10. Write an algorithm on functions to create, delete and display node in the linked list
11. WAP to create a linked list and display.
12. Write program to the following.
a)to delete a node at the beginning of list.
b)to delete a last node of the list.
MODULE-9 TREEs AND GRAPHs
1) What are the terminologies of tree, explain with tree structure
2) Write an algorithm for a creation of a binary tree.
3) Draw array representation of tree
2) What is preorder traversal of the given tree.
4) What is in order traversal, write inorder traversal for the given tree.
5) What is post order traversal. Write post order traversal for the given tree.
6) What is heap tree?
7) What is binary search tree?
8) What are the properties of binary tree?
9) What is Graph? Applications of graph
10) Types of traversal in Graphs
11) Explain the concept of depth first search with reference to graph.
No comments:
Post a Comment