Solving the Top k most frequent words problem using a max-heap (#8685)

* Solving the `Top k most frequent words` problem using a max-heap

* Mentioning Python standard library solution in `Top k most frequent words` docstring

* ruff --fix .

* updating DIRECTORY.md

---------

Co-authored-by: Amos Paribocci <aparibocci@gmail.com>
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
This commit is contained in:
Christian Clauss
2023-04-27 19:32:07 +02:00
committed by GitHub
parent c1b3ea5355
commit 4c1f876567
4 changed files with 128 additions and 7 deletions

View File

@ -399,7 +399,7 @@ def main():
if input("Press any key to restart or 'q' for quit: ").strip().lower() == "q":
print("\n" + "GoodBye!".center(100, "-") + "\n")
break
system("clear" if name == "posix" else "cls") # noqa: S605
system("cls" if name == "nt" else "clear") # noqa: S605
if __name__ == "__main__":