You are viewing a single comment's thread. Return to all comments →
Here is my code
from collections import deque q = deque() for _ in range( int(input()) ): operation, *value = input().split() # print(operation, value) method = getattr(q, operation) method(*value) print(*q)
Seems like cookies are disabled on this browser, please enable them to open this website
I agree to HackerRank's Terms of Service and Privacy Policy.
Collections.deque()
You are viewing a single comment's thread. Return to all comments →
Here is my code