Top Data-Structures Interview Questions
Mobiprep handbooks are free downloadable placement preparation resources that can help you ace any company placement process. We have curated a list of the 40 most important MCQ questions which are asked in most companies such as Infosys, TCS, Wipro, Accenture, etc. The placement handbooks also have detailed explanations for every question ensuring you revise all the questions with detailed answers and explanations.
Question
1
Explanation
What are the advantages of Linkedlists over array?
In linkedlists insertion/deletion is faster than array. Linkedlists have dynamic size where arrays have fixed size.
Memory utilization and allocation is efficient in linkedlists.
Question
2
Explanation
List some applications of stack.
Compilers use stacks to evaluate expressions.
Reversing a string.
Simulating recursion
Syntax parsing
Calling subroutine
Question
3
Explanation
Write a syntax in C to create a node in doubly linkedlist.
struct Node {
int data;
struct Node* next;
struct Node* prev;
};
Question
4
Explanation
Write algorithms of preorder,post-order and inorder traversal in trees.
PREORDER:
Visit the root
Traverse the left sub-tree
Traverse the right sub-tree
POSTORDER:
Traverse the left sub-tree
Traverse the right sub-tree
Visit the root
INORDER:
Traverse the left sub-tree
Visit the root
Traverse the right sub-tree