c7798600d67acb49d398ebe90e9d7e2fcfe5738c
This way we take advantage of the constant-time insertion and removal of elements at the beginning of Front Extensible sequences, such as list. This implementation is closer to the original.
Languages
C++
99.2%
Python
0.8%