
If there is only one entry possible in the bucket, when the collision occurs, there is no way to accommodate the colliding value which results in the overlapping of values. Postfix notation for the given expression: ABC*+DE/- Q14 - when the overlapping and collision occur at the same time, then what is the size of the bucket? Prefix notation for the given expression: -+A*BC/DE What are prefix and postfix notation for the expression A+B*C-D/E? Stack follows LIFO(Last In First Out) principle whereas queue follows FIFO(First In Last Out) principle. Q13 - What is the difference between stack and queue? If the ‘Height factor’ is greater than 1 or less than -1. Q12 - In an AVL tree, at what condition the balancing is to be done? Q11 - What is the type of the algorithm used in solving the 8 Queens problem?īacktracking(stack application). Q10 - List out few of the applications that make use of Multilinked Structures? Q9 - What are the methods available for storing sequential files?ĭistribution of Initial runs. Every recursive function has its equivalent iterative (non-recursive) functions.For these non-recursive functions also, system stack will be used. Recursion makes use of system stack for storing the return addresses of the function calls. Because of its LIFO (Last In First Out) property, it remembers its ‘caller’ so knows whom to return when the function has to return. Q8 - What are the data structures used to perform recursion?

One queue is used for actual storing of data and another for storing priorities. Q7 - What is the minimum number of queues needed to implement the priority queue? Q6 - What factors determine the choice of data structure for a program?Īs a programmer, we should consider the following factors. A void pointer is capable of storing a pointer to any type as it is a generic pointer type. It is not possible to use ordinary pointers for this. The heterogeneous linked list contains different data types in its nodes and we need a link, pointer to connect them. If (q->stack1 = NULL & q->stack2 = NULL) Data Structures Common Interview Questions Q5 - If you are using C language to implement the heterogeneous linked list, what pointer type will you use? Linked List, Stacks Q3 - Write a C program to implement a queue using two stacks.

Queue is said to be linear because its elements form a sequence or a linear list. Q2 - Why is a queue called a linear data structure? In a stack we remove the item the most recently added in a queue, we remove the item the least recently added. The difference between stacks and queues is in removing. Queues Data Structure – Interview Questions Q1 - How is queue different from a stack?
