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 96c1ecb commit ab7c1b2Copy full SHA for ab7c1b2
src/main/ts/g0001_0100/s0023_merge_k_sorted_lists/solution.ts
@@ -17,7 +17,7 @@ import { ListNode } from '../../com_github_leetcode/listnode'
17
*/
18
const merge2Lists = (list1: ListNode | null, list2: ListNode | null): ListNode | null => {
19
if (!list1 || !list2) {
20
- return list1 || list2
+ return list1 ?? list2
21
}
22
const tempHead = new ListNode()
23
let current = tempHead
0 commit comments