Interview questions
Data Structure interview questions – page 2
891 questions. Tap “Show answer” to check yourself.
-
If a binary tree satisfies shape and order property, it is known as
- A.Rooted tree
- B.Heap
- C.Sequential search tree
- D.Binary search tree
Show answer
B. Heap
-
With an array-based stack, the algorithm for push is
- A.Increment top and add item to the new top location
- B.Add item to the top location and then increment top
- C.Return the top item and increment top
- D.Return the top item and decrement top
Show answer
A. Increment top and add item to the new top location
-
What is the worst case time for quick sort to sort an array of n elements?
- A.0(n)
- B.0(nlog2n)
- C.0(log2n)
- D.0(log2n)
Show answer
D. 0(log2n)
-
The best way to find an item in an unsorted implemented using an array list is with
- A.Binary search
- B.Linear search
- C.Direct search
- D.Random search
Show answer
B. Linear search
-
Which of the following data structure is used to represent a relationship between pairs, where relationship is not hierarchical?
- A.Priority queue
- B.Heap
- C.Tree
- D.Graph
Show answer
D. Graph
-
A data item that cannot be divided into sub items is known as
- A.Elementary data item
- B.Group data item
- C.Primary key
- D.Primary data item
Show answer
B. Group data item
-
The best way to find an item in a sorted list implemented using an array is with ___
- A.Direct search
- B.Random search
- C.Binary search
- D.Linear search
Show answer
C. Binary search
-
Which of the following data structure is more appropriate to represent a heap?
- A.Two-dimensional array
- B.Doubly linked list
- C.Linear Array
- D.Linked list
Show answer
C. Linear Array
-
Minimum number of fields in each node of a doubly linked list is ____
- A.2
- B.3
- C.4
- D.None of the above
Show answer
B. 3
-
A graph in which all vertices have equal degree is known as ____
- A.Complete graph
- B.Regular graph
- C.Multi graph
- D.Simple graph
Show answer
A. Complete graph
-
Which of the following file organizations is not suitable for an interactive application?
- A.Indexed sequential file organization
- B.Inverted file organization
- C.Sequential file organization
- D.Relative file organization
Show answer
C. Sequential file organization
-
Which of following is not a type of a I/O channel?
- A.Block multiplexer
- B.Multiplexer
- C.Selector
- D.Demultiplexer
Show answer
D. Demultiplexer
-
A linear list in which elements can be added or removed at either end is known as
- A.Circlular queue
- B.Priority queue
- C.Queue
- D.Deque
Show answer
D. Deque
-
Which of the following tree maintains a list of the keys in sequential order?
- A.B+-tree
- B.B*-tree
- C.B-tree
- D.m-way search tree
Show answer
A. B+-tree
-
Which of the following sorting algorithm is the slowest?
- A.Bubble sort
- B.Heap sort
- C.Shell sort
- D.Quick sort
Show answer
A. Bubble sort
-
Which of the following data structure can be used to represent many-to-many relation?
- A.B-tree
- B.Binary tree
- C.Graph
- D.All of above
Show answer
C. Graph
-
Which of the following statement is not true about linked lists?
- A.Element in a linked list, if it is sorted, can be quickly searched by applying binary search technique
- B.Elements are not necessarily stored in contiguous locations
- C.Insertions and deletions can be performed efficiently as compared to arrays
- D.Linked list is a dynamic structure
Show answer
A. Element in a linked list, if it is sorted, can be quickly searched by applying binary search technique
-
Which of the following is not a linear data structure?
- A.Stack
- B.Queue
- C.Linked list
- D.Binary tree
Show answer
D. Binary tree
-
Which of the following data structure permits insertion and deletion operations only on one end of the structure?
- A.Linked list
- B.Array
- C.Stack
- D.Queue
Show answer
C. Stack
-
What is the worst-case time for serial search finding a single item in an array?
- A.Quadratic time
- B.Linear time
- C.Logarithmic time
- D.Constant time
Show answer
B. Linear time
-
A non-circular doubly linked list can best and most generally be defined as a ___
- A.Set of elements, each with two pointers
- B.Set of elements chained together with pointers
- C.Linear sequence of elements in sequential memory locations
- D.Linear sequence of elements chained together with pointers
Show answer
D. Linear sequence of elements chained together with pointers
-
Which of the following operations is a dictionary operation?
- A.Search
- B.Delete
- C.Insert
- D.All of above
Show answer
D. All of above
-
To create a linked structure, each node must have one member, which is ____
- A.A pointer to the head of the list
- B.A pointer to NULL
- C.A pointer to the node type
- D.A reference to the element type
Show answer
C. A pointer to the node type
-
Each attribute of an entity has a defined set of values. This set of values is called a
- A.Mapping
- B.Entity set
- C.Domain
- D.Range
Show answer
C. Domain
-
A data structure in which linear sequence is maintained by pointers is known as
- A.Array
- B.Stack
- C.Linked list
- D.Pointer-based data structure
Show answer
C. Linked list
-
Which of the following data structure works on the principle of First Come First Serve?
- A.Priority queue
- B.Heap
- C.Stack
- D.Queue
Show answer
D. Queue
-
A ____ is a linear collection of self-referential structures, called nodes, connected by pointer links.
- A.Queue
- B.Linked list
- C.Tree
- D.Stack
Show answer
B. Linked list
-
A queue where all elements have equal priority is a
- A.ILFO data structure
- B.LILO data structure
- C.FIFO data structure
- D.LIFO data structure
Show answer
C. FIFO data structure
-
A file that is only read by a program is known as ____
- A.Input file
- B.Temporary file
- C.Work file
- D.Input/output file
Show answer
A. Input file
-
Which of the following is not an open addressing technique to resolve collisions?
- A.Linear probing
- B.Cubic probing
- C.Double hashing
- D.Quadratic probing
Show answer
B. Cubic probing