Python3 Solution + Better Description Because This One Is Really Bad
The description as of June 13th, 2022 mentions nothing a ptr. There is a ptr that should be initialized at 1. If an item is inserted with an idKey above the ptr
The description as of June 13th, 2022 mentions nothing a ptr. There is a ptr that should be initialized at 1. If an item is inserted with an idKey above the ptr, return nothing. If an item is inserted that matches the ptr, return the largest chunk of contiguous values above the ptr. The ptr should update to the index immediately after the returned chunk. \n\n```\nclass OrderedStream:\n\n    def __init__(self, n: int):\n        self.ptr = 1\n        self.hashmap = dict()\n        \n\n    def insert(self, idKey: int, value: str) -> List[str]:\n        self.hashmap[idKey] = value\n        output = []\n        if idKey > self.ptr:\n            return output\n        \n        while idKey in self.hashmap:\n            output.append(self.hashmap[idKey])\n            idKey += 1\n            self.ptr = idKey\n            \n        return output\n```
['Python3']