Sunday, 29 October 2017

Question Bank of Data Structure: Set 2

Q.1 Convert the following infix expression to post fix notation ((a+2)*(b+4)) -1.
Q.2 How is it possible to insert different type of elements in stack?
Q.3 Stack can be described as a pointer. Explain.
Q.4  Which data structure is needed to convert infix notations to post fix notations?
Q.5 Parenthesis are never needed in prefix or postfix expressions.Why?
Q.6 Minimum number of queues needed to implement the priority queue?
Q.7 Write an algorithm to evaluate a postfix expression.
Q. 8 Execute your algorithm using the following postfix expression as your input : a b + c d +*f.
Q.9 What are circular queues? Write down routines for inserting and deleting elements from a circular queue implemented using arrays.
Q.10 In which data structure, elements can be added or removed at either end, but not in the middle?
Q.11 What are the methods available in storing sequential files?
Q.12 A stack is to be implemented using an array. The associated declarations are: int stack [100]; int top = 0;
Q.13 Give the statement to perform push operation.
Q.14 Implement a Queue using a singly linked list L. The operations INSERT and DELETE should still take O(1) time.
Q.15 What do you mean by Base case, Recursive case, Binding Time, Run-Time Stack and Tail Recursion?
Q.16 Write an algorithm for finding solution to the Tower’s of Hanoi problem. Explain the working of your algorithm (with 4 disks) with diagrams. 
Q.17 Reverse the order of elements on a stack S: (i) using two additional stacks. (ii) using one additional queue. 
Q.18 Write an algorithm INSERT that takes a pointer to a sorted list and a pointer to a node and inserts the node into its correct position in the list.
Q.19 Devise a representation for a list where insertions and deletions can be made at either end. Write functions for inserting and deleting at either end.
Q.20 Execute your algorithm to convert an infix expression to a post fix expression with the following infix expression as input A+B-C/D*E*F*G/H.


Thanks
Mukesh Rajput

No comments:

Post a Comment

Thanks
Mukesh Rajput