$ ./guess_the_languageProblem Solving — fill the blank
Problem Solving — fill the blank · medium · #242

What goes in the blank?

# a queue with O(1) pops from the left
frontier = ____([start])

Answer: deque (also accepted: deque, deque(), collections.deque)

collections.deque pops from either end in constant time, unlike a list.
Play Problem Solving ▸