Skip to content

[bug][javascript] find-median-from-data-stream #1143

Closed
@labuladong

Description

此 issue 的目的是修复 chatGPT 转译的多语言代码,更详细的背景信息和修复流程见:#1113

请在提交 bug 之前先搜索

  • 我已经搜索过 issues,没有发现相同的 bug。

出错的题目链接

https://leetcode.cn/problems/find-median-from-data-stream/

报错信息

/.nvm/versions/node/v16.13.2/lib/node_modules/@datastructures-js/priority-queue/src/priorityQueue.js:50
    return this._heap.size();
                      ^
TypeError: Cannot read properties of undefined (reading 'size')
    Line 50: Char 23 in priorityQueue.js (PriorityQueue.size)
    Line 21: Char 19 in solution.js (MedianFinder.addNum)
    Line 35: Char 26 in solution.js (helper_select_method)
    Line 83: Char 22 in solution.js (Object.<anonymous>)
    Line 16: Char 8 in runner.js (Object.runner)
    Line 30: Char 26 in solution.js (Object.<anonymous>)
    at Module._compile (node:internal/modules/cjs/loader:1101:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
Debug: 

你是否愿意提交 PR 修复这个 bug?

  • 我愿意!

Metadata

Assignees

No one assigned

    Labels

    help wantedExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions