Score 1.
00 of 1
1. Which data structure would result in the data being sorted soon after being
inserted
Queues
Stack
Circular queue
Priority Queues
Feedback:
Priority queues have the data sorted as they are inserted into the queue
Score 1.00 of 1
2. If the elements “A”, “B”, “C” and “D” are placed in a queue one after the other
and are deleted one at a time, in what order will they be removed?
ABCD
Feedback:
Queue works on the principle " first come first serve". Hence the element (A)which enters
first will be the element that gets removed out of the queue
DCBA
DCAB
ABDC
Score 1.00 of 1
3. Binary search is used for searching an unordered list
TRUE
FALSE
Feedback:
Its a search algorithm which only works on sorted list. The algorithm makes the next
move in search assuming the list is sorted
Score 1.00 of 1
4. When working with Queue, initial values for front and rare should be
0 and 1
0 and -1
Feedback:
When queue is created for the first time without any elements, the front is initialised with
0 and rear with -1
1 and 0
0 and 0
Score 1.00 of 1
5. Which of the following data structure is non linear type ?
Strings
Lists
Stacks
Tree
Feedback:
A non-linear data structure is a data structure in which a data item is connected to
several other data items. So that a given data item has the possibility to reach
one-or-more data items
Score 1.00 of 1
6. In linked representation of stack _____________ holds the elements of the
stack.
Info field
Feedback:
The info field of a linked list holds the elements/data
Top field
Link field
next field
Score 1.00 of 1
7. _____________ is not the operation that can be performed on stacks
Push
Pop
Display
Retrieve
Feedback:
Push, Pop and Display/Traverse are the operations performed on stacks
Score 1.00 of 1
8. Consider the Pre-order traversal of a tree:
FOPQRST
Which is the root node of the tree
Feedback:
In pre-order traversal the root node is processed first
Score 1.00 of 1
9. Consider the Graph with 5 vertices, V = {A,B,C,D,E} and Edges as
{(A,B),(A,C),(A,E),(B,C),(B,D),(B,E),(C,E)}
select the edges to be removed to make the graph a directed tree
(A,C), (B,D) and (A,E)
(B,C), (A,E), (C,E)
Feedback:
A Directed tree is an acyclic graph which was one node with Indegree 0 and the rest of
the nodes has an indegree 1
(A,C), (A,E) and (B,D)
(B,E), (A,E), (C,E)
Score 1.00 of 1
10. The difference between an array and a structure is
An array is suitable for homogeneous data and structures are used to store
heterogeneous data
In a structure there may not be a natural ordering in opposed to linear array.
A structure form a hierarchical structure but a linear array does not
All of above
Feedback:
Array is a linear data structure storing homogenous collection of data where as a
structure is a collection of related data of heterogeneous types
Score 1.00 of 1
11. Which of the following statement is false
Arrays are dense lists and static data structure
data elements in linked list need not be stored in adjacent space in memory
Linked lists are pointers storing the next data element of a list
Feedback:
Each node in the list will have data and also pointer containing address of the next node.
linked lists are collection of the nodes that contain information part and pointer to the next
node in the list
Score 1.00 of 1
12. The term "push" and "pop" is related to
Arrays
Lists
Stacks
Feedback:
The term push and pop is related to stacks
Queues
Score 1.00 of 1
13. A data structure where elements can be added or removed at either end but
not in the middle
Linked Lists
Stacks
Deque
Feedback:
Deque Allows insertion and deletion from both the ends
Arrays
Score 1.00 of 1
14. A tree is a
Directed graph
Cyclic Graph
Directed and Acyclic Graph
Feedback:
A tree is a directed acyclic graph
Acyclic Graph
Score 1.00 of 1
15. A normal queue, if implemented using an array of size MAX_SIZE, gets full
when
Rear=MAX_SIZE-1
Feedback:
In an array of size n, the elements occupy the index starting from 0 to n-1.If we have
Array of size MAX_SIZE, the last element position will be MAX_SIZE -1
Front=(rear+1)mod MAX_SIZE
Front=rear+1
Rear=front