Question 9 Which of the following operation(s) is/are performed on queues?
Palo Alto Networks technical mcq question, verified with a worked answer. Free to practise - no sign-up.
Question 9
Which of the following operation(s) is/are performed on queues?
Select any one of the following options
Show answer & explanation
Answer: D. D) All of the above
Queues support initialization (init), insertion at rear (enqueue), and removal from front (dequeue). Hence all are standard operations.
Step-by-step Derivation:
Step 1: init() initializes the front and rear pointers and internal buffer.
Step 2: enqueue() inserts an element at the rear.
Step 3: dequeue() removes an element from the front.
Step 4: Therefore, all of the listed operations are performed on queues.