19cse212-QueueLinkedListPython-CSEA


Submit solution

Points: 20
Time limit: 8.0s
Memory limit: 10M

Author:
Problem type
Allowed languages
Python

Implement Queue Data structures using Linked List

Input:
  • The First line of the input contains an integer N denoting the number of operations
  • Then for each input line of operation has the following format:

            E <element>       Enqueue operation
            D                 Dequeue operation
            I                 Checks if queue is empty or not
            S                 Number of elements in the queue
            F                 Returns front element in Queue.
Constraints
  • 1 <= N <= 20
Sample Input:
8
E 10
E 20
E 30
S
D
F
D
D
Sample Output:
10 
10 20
10 20 30 
3
20 30
20
30

Comments

There are no comments at the moment.