DATA STRUCTURE INTERVIEW
QUESTIONS AND ANSWERS
What is a Data Structure? - Correct Answers -A data structure is a way of organizing the
data so that the data can be used efficiently.
Non-Linear: A data structure is said to be non-linear if traversal of nodes is nonlinear in
nature. Example: Graph and Trees.
What are the various operations that can be performed on different Data Structures? -
Correct Answers -Insertion, Deletion, Traversal, Searching, Sorting
What are linear and non linear data Structures? - Correct Answers -Linear: A data
structure is said to be linear if its elements form a sequence or a linear list. Examples:
Array. Linked List, Stacks and Queues
How is an Array different from a Linked List - Correct Answers -array size is fixed,
Linked Lists size are Dynamic
insertion and deletion is easily done in Linked Lists, but for arrays is expensive
No Random access in Linked List
link lists need Extra memory space for a pointer
Arrays have better cache locality
What is Stack and where it can be used? - Correct Answers -Stack is a linear data
structure which the order LIFO(Last In First Out) for accessing elements.
Basic operations of stack are : Push, Pop , Peek
What is a Queue, how it is different from stack and how is it implemented? - Correct
Answers -Queue is a linear structure which follows the order is First In First Out (FIFO)
to access elements
queue is FIFO while stack is LIFO
implemented using Arrays or Linked Lists
QUESTIONS AND ANSWERS
What is a Data Structure? - Correct Answers -A data structure is a way of organizing the
data so that the data can be used efficiently.
Non-Linear: A data structure is said to be non-linear if traversal of nodes is nonlinear in
nature. Example: Graph and Trees.
What are the various operations that can be performed on different Data Structures? -
Correct Answers -Insertion, Deletion, Traversal, Searching, Sorting
What are linear and non linear data Structures? - Correct Answers -Linear: A data
structure is said to be linear if its elements form a sequence or a linear list. Examples:
Array. Linked List, Stacks and Queues
How is an Array different from a Linked List - Correct Answers -array size is fixed,
Linked Lists size are Dynamic
insertion and deletion is easily done in Linked Lists, but for arrays is expensive
No Random access in Linked List
link lists need Extra memory space for a pointer
Arrays have better cache locality
What is Stack and where it can be used? - Correct Answers -Stack is a linear data
structure which the order LIFO(Last In First Out) for accessing elements.
Basic operations of stack are : Push, Pop , Peek
What is a Queue, how it is different from stack and how is it implemented? - Correct
Answers -Queue is a linear structure which follows the order is First In First Out (FIFO)
to access elements
queue is FIFO while stack is LIFO
implemented using Arrays or Linked Lists