Sign in
Log inSign up
Rupert McKay

105 likes

2.4K reads

4 comments

Raghuvir S. Gulia
Raghuvir S. Gulia
Feb 28, 2022

Amazing 馃憦

1
Aditya Mitra
Aditya Mitra
Feb 28, 2022

Great Article! Loved the 4 points for what should not be memoized

Just curious - JS Map orders the keys in manner of insertion. Does it actually give a O(1) lookup or O(logn)?

1
1 reply
Rupert McKay
Rupert McKay
Author
Feb 28, 2022

The lookup time is still constant thanks to hash key lookup. The keys being ordered is a separate part of the same data structure.

2
Raghav Singh Gulia
Raghav Singh Gulia
Feb 28, 2022

Awesome 馃く