Prefer deque over inserting to start of list
Review Request #7820 — Created Dec. 22, 2015 and submitted — Latest diff uploaded
Prepending to a python list is inefficient (according to the
python docs,list.insert(0, v)
isO(n)
) and using adeque
is
superior for performance (deque.appendleft(v)
isO(1)
).
Testing done:
- Ran unit tests.