educative.io

HashMap incorrect

It looks like the hash map in the illustration is inverted, the keys representing the frequencies and the values representing the elements.


Course: Grokking Coding Interview Patterns in JavaScript - Learn Interactively
Lesson: Solution: Top K Frequent Elements - Grokking Coding Interview Patterns in JavaScript

Hello @Elvin_Kosova,

Thank you for reporting this issue. This illustrations have been fixed, and we’ll let you know once the updated version is live.

If you have any more questions or need further clarification, please let us know.

Happy learning!