fucking-algorithm icon indicating copy to clipboard operation
fucking-algorithm copied to clipboard

[bug][{python}] {merge-k-sorted-lists}

Open wwang108 opened this issue 3 years ago • 0 comments

请在提交 bug 之前先搜索

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

出错的题目链接

https://leetcode.com/problems/merge-k-sorted-lists/

报错信息

TypeError: '<' not supported between instances of 'ListNode' and 'ListNode' heapq.heappush(pq, (head.val, head)) Line 20 in mergeKLists (Solution.py) ret = Solution().mergeKLists(param_1) Line 54 in _driver (Solution.py) _driver() Line 65 in (Solution.py)

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

  • [X] 我愿意!

wwang108 avatar Mar 26 '23 23:03 wwang108