![]() |
VOOZH | about |
The push() is an inbuilt function in Ruby inserts the element in the queue.
Syntax: q_name.push(element)
Parameters: The function takes the element to be inserted into the queue.
Return Value: It inserts the element into the queue.
Example 1:
Output:
5 6
Example 2:
Output:
10 12 13