We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dfdfb81 commit b0a42a8Copy full SHA for b0a42a8
632-smallest-range.js
@@ -188,7 +188,7 @@ var smallestRange = function(nums) {
188
189
// another
190
191
-class PriorityQueue {
+class PQ {
192
constructor(comparator = (a, b) => a > b) {
193
this.heap = []
194
this.top = 0
@@ -260,7 +260,7 @@ class PriorityQueue {
260
* @return {number[]}
261
*/
262
const smallestRange = function (nums) {
263
- const pq = new PriorityQueue((a, b) => a[0] < b[0])
+ const pq = new PQ((a, b) => a[0] < b[0])
264
const limit = 10 ** 5,
265
n = nums.length,
266
{ max } = Math
0 commit comments