Map + LinkedList. But Javascript Map actually keeps track of the key in order, so built-in map would be sufficient enough
Here is my code https://github.com/JSerZANP/leetCode_...
Hi I'm a JavaScript engineer who is not good at algorithms,
and currently practicing leetCode online. If you are interested, maybe we can learn together.