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

What goes in the blank?

# shortest path on an unweighted graph
frontier = ____([start])

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

BFS needs a FIFO queue; a deque gives O(1) at both ends.
Play Problem Solving ▸