On Sat, 1 Aug 2020 at 03:00, Inada Naoki <songofaca...@gmail.com> wrote:
> Please teach me if you know any algorithm which has no hole, O(1) > deletion, preserving insertion order, and efficient and fast as array. > :) About the hole, I was thinking that in theory the problem can be circumvented using a modified version of lookdict. lookdict searches for a key and returns its position in the ma_keys array. I suppose it's possible to do the contrary: search for the index and return the key. What do you think (theoretically speaking)?
_______________________________________________ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-le...@python.org https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/57BDPRYVMMALKERYPRJMQO4AH33FWOV4/ Code of Conduct: http://python.org/psf/codeofconduct/