mollihuaPop first element of a queue in Python — list.pop(0) vs collections.deque.popleft()The time complexity of deque.popleft() is O(1), while the time complexity of list.pop(0) is O(k), as index of 0 is considered an…Jul 2, 2020Jul 2, 2020