Sie sind auf Seite 1von 2

C. tree.

Data Structures :: Queue


D. linked list.
How is Data in a queue accessed Answer: Option A
A. First in First out
The data structure required for Breadth First Traversal on a graph is
B. First in last out
A. queue
C. Last in First out
B. stack
D. None of these
C. array
Answer: Option A
D. tree
Explanation:
Here is no explanation for this answer Answer: Option A
Explanation:
Item in priority queue can jump to the front on the line if they have priority
queue is not a graph type, is a linear type, but how can it answer
A. TRUE
Let the following circular queue can accommodate maximum six elements with the following data
B. FALSE front = 2 rear = 4
C. None of these queue = _______; L, M, N, ___, ___
What will happen after ADD O operation takes place?
Answer: Option A
A. front = 2 rear = 5 queue = ______; L, M, N, O, ___
Explanation:
A priority queue is similar to a simple queue in that items are organized in a line and processed sequentially. However, B. front = 3 rear = 5 queue = L, M, N, O, ___
items on a priority queue can jump to the front of the line if they have priority. Priority is a value that is associated with C. front = 3 rear = 4 queue = ______; L, M, N, O, ___
each item placed in the queue.
D. front = 2 rear = 4 queue = L, M, N, O, ___
The dequeue process removes data from the front of the single ended queue
Answer: Option A
A. TRUE
Explanation:
B. FALSE Because Queue is FIFO so when we add 0 its obvious that it will come after N at position 5.

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

A. (rear + 1) % CAPACITY D. Deque

B. rear + (1 % CAPACITY) Answer: Option D

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

Which among the following are applications of queues ?


A. Queues keep track of events waiting to be handled, like multiple button clicks
B. Queues are used for evaluation of arithmetic expressions
C. Queues are used in parsing
D. None of these

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

Das könnte Ihnen auch gefallen