Описание задачи: https://github.com/CrazySquirrel/Outt...
Pop elements: O(kn) | O(1) - https://github.com/CrazySquirrel/Outt...
List comprehension: O(n) | O(n) - https://github.com/CrazySquirrel/Outt...
Two Pointers: O(n) | O(1) - https://github.com/CrazySquirrel/Outt...
Two Pointers (rare): O(n) | O(1) - https://github.com/CrazySquirrel/Outt...