Skip to content

Conversation

@danielm-orca
Copy link

Implemented in two steps:

  1. Get frequencies in a HashMap:
  2. Change merged frequencies into BinaryHeap (max heap) and get K=10 most common words

Notes:

  • This doesn't conform with most online solutions of frequency, as usually they lowercase everything and then take the frequency.
  • Instead of poping from the heap we can use into_iter_sorted, but that's an experimental feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant