Beruflich Dokumente
Kultur Dokumente
C. None of these
Answer: Option A 1
Explanation: 2. L
Here is no explanation for this answer
3.M
Time taken for addition of element in queue is 4.N
A. O(1) and when add o in this Queue as its FIFO it comes at position 5
B. O(n) 5.O
C. O(log n) 6.
D. None of these options
A queue is a,
Answer: Option C
A. FIFO (First In First Out) list.
Explanation:
B. LIFO (Last In First Out) list.
I think this answer should be A. O(1). because this question is asked about the normal queue.
C. Ordered array.
D. Linear tree.
Answer: Option A
For priority queue this should be O(log n).
6, 8, 4, 3, and 1 are inserted into a data structure in that order. An item is deleted using only a basic data structure
A linear list of elements in which deletion can be done from one end (front) and insertion can take place only at the operation. If the deleted item is a 1, the data structure cannot be a ?
other end (rear) is known as a
A. Queue
A. queue.
B. Tree
B. stack.
C. Stack
D. Hash Table A data structure where elements can be added or removed at either end but not in the middle is referred as
Answer: Option A A. Linked lists
B. Stacks
We need to implement a queue using a circular array. If DATA is a circular array of CAPACITY elements, and rear is
an index into that array, what will be the index for the element after rear? C. Queues
C. rear % (1 + CAPACITY)
D. (rear % 1) + CAPACITY
Answer: Option D
Explanation:
option A should be correct, modulus of a will always be zero in case of integer value.
If a queue is implemented with a linked list, keeping track of a front node and a rear node with two reference
variables. Which of these reference variables will change during an insertion into an
EMPTY queue ?
A. Only front changes
B. Both change
C. Only rear changes
D. Neither changes
Answer: Option B
The following data structure allows deleting data elements from front and inserting at rear
A. Stacks
B. Queues
C. Deques
D. Binary search tree
Answer: Option B
This data structure allows deletions at both ends of the list but insertion at only one end.
A. Input-restricted deque
B. Output-restricted deque
C. Priority queues
D. None of the above
Answer: Option A
Explanation:
Here is no explanation for this answer