We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
- Prepare
- Python
- Collections
- Piling Up!
- Discussions
Piling Up!
Piling Up!
Sort by
recency
|
995 Discussions
|
Please Login in order to post a comment
from collections import deque
T = int(input()) for i in range(T): top_of_pile = float('inf') n = int(input()) D = deque(map(int,input().split())) s = True for j in range(n): if D[-1] >= D[0]: cc = D.pop() else: cc = D.popleft()
T = int(input())
res=''
for _ in range(T):
T = int(input())
for _ in range(T):
t = int(input())
for test_case in range(t):