|
|
back to boardWhere can I improve on my Python solution? EDIT: Finally passed with Python in 0.109s. deque() really works for this problem. The key insight is to recognise how we design the pop() and popleft() to make sure the first element of the list is the largest element which has not expired. Whether or not the middle elements have expired does not matter. Edited by author 01.04.2018 15:32 |
|
|