How can the priority queue based solution be written using C#?

  • 0

    I find this solution by HelloWorld123456 to be very intuitive.

    C# does not have native support for priority queue/heap. How can I write equivalent code that will be accepted by LeetCode? What is an acceptable alternative with O(lgn) insert and remove?

  • 0

    I don't understand why MS doesn't add PQ in the library.....It kills me Every time when I meet PQ questions. Since Java and C++ can easily new a PQ in one line. C# have to start from scratch.....

Log in to reply

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.