Problem Submissions Solution

Queue using Linked List

Difficulty: Easy

Acceptance: %

Points: 20.00

Implement a Queue using Linked List.

A Query Q is of 2 Types

  1. 1 x (a query of this type means pushing 'x' into the queue)
  2. 2 (a query of this type means to pop an element from the queue and print the popped element)

Topics

Companies

Articles

Examples:

Expected Time Complexity: O(1).

Expected Auxiliary Space: O(1).

Constraints:
  • 1 <= Q <= 100
  • 1 <= x <= 100
Companies:
Microsoft Apple Walmart
Topics:
Queue
Locked Content
Access Restricted: Please Login to access the code editor and test cases.