[C#] What do you do if you need to use Priority Queue

As far as I know, PriorityQueue is being supported in C# if .NET > 6

If the coding environment (ex. Leetcode / CoderPad / etc.) doesn't support PriorityQueue due to lower version of .NET, what do you usually do? Do you implement your own min/max heap?

It seems like Java is more convenient in terms of this. Creating PriorityQueue and doing push or poll will automatically take care of it? (correct me if I am wrong)

Thank you very much in advance for comment and thought!

Comments (2)