Posts

Showing posts with the label piling up

Challenge - #58 - Piling Up!

  # Enter your code here. Read input from STDIN. Print output to STDOUT from  collections  import  deque def  piling(d):      while  d :         large =  None          if  d[ -1 ] > d[ 0 ]:             large = d.pop()          else  :             large = d.popleft()                   if   len (d) ==  0  :              return   "Yes"                 ...