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