fucking-algorithm
fucking-algorithm copied to clipboard
[bug][{python}] {merge-k-sorted-lists}
请在提交 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
你是否愿意提交 PR 修复这个 bug?
- [X] 我愿意!