ckloi / Scripting-Languages

0 stars 1 forks source link

hifreqs won't output duplicates correctly #30

Closed Ajfaust closed 7 years ago

Ajfaust commented 7 years ago

If two different patterns have the same frequency and the latter is among the k highest, include them both.

Say we want to print the two highest frequencies, and our two highest frequencies are 5 and 2, but there are multiple keys with the value of 2. Our function will only print one when it needs to print all keys with that value.

ckloi commented 7 years ago

@tihju

Ajfaust commented 7 years ago

Fixed it. I pushed the code. Let me know if you're confused about how it works. @ckloi @tihju @mwared