Skip to content

Conversation

@Srihari2222
Copy link
Collaborator

@neetcode-gh

  • Took 5 hours for this work.
  • Please review this.
  • Also, these problems doesn't have heap involved but please inform that should I add custom heap template for JS code in future problems or leave like in this article: this one .

@Srihari2222 Srihari2222 changed the title Neetcode-150/articles Sri Hari: Neetcode-150/articles Oct 5, 2024
@Ykhan799 Ykhan799 requested a review from neetcode-gh October 5, 2024 15:21
@neetcode-gh
Copy link
Owner

Thanks @Srihari2222 this looks good.


I currently do have a heap class and a queue class available in js. Here are the ones I'm using:

https://github.com/datastructures-js/priority-queue/
https://github.com/datastructures-js/queue/tree/master

They are the same as the ones on LC, but mine have a higher version, so they may not work on LC. Just make sure they work on NC.

I updated the top-k-elements JS heap solution here: ec05954

In future problems requiring a heap, you can handle the JS solutions similarly. Let me know if you have any questions.

@neetcode-gh neetcode-gh merged commit 45d5746 into neetcode-gh:main Oct 5, 2024
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.

2 participants