Skip to content

Commit 314e56a

Browse files
committedMay 25, 2023
✨ [23] Merge k Sorted Lists
1 parent 0e8cee2 commit 314e56a

File tree

3 files changed

+20
-1
lines changed

3 files changed

+20
-1
lines changed
 

‎23/my_solution.js

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
function ListNode(val, next) {
2+
this.val = (val === undefined ? 0 : val)
3+
this.next = (next === undefined ? null : next)
4+
}
5+
6+
/**
7+
* @param {ListNode[]} lists
8+
* @return {ListNode}
9+
*/
10+
var mergeKLists = (lists) => {
11+
console.log("lists")
12+
console.log(lists)
13+
14+
return;
15+
16+
};
17+
18+
// [[1,4,5],[1,3,4],[2,6]]

‎23/solution.js

Whitespace-only changes.

‎README.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
- [11. Container With Most Water](./11/)
1616
- [15. 3Sum](./15/)
1717
- [22. Generate Parentheses](./22/)
18+
- [23. Merge k Sorted Lists](./23/)
1819
- [33. Search in Rotated Sorted Array](./33/)
1920
- [53. Maximum Subarray](./53/)
2021
- [121. Best Time to Buy and Sell Stock](./121/)
@@ -59,7 +60,7 @@ iex ./.../solution.ex
5960

6061
Quick create in bash
6162
```ssh
62-
chapter=11 && mkdir ./$chapter && touch ./$chapter/my_solution.js && touch ./$chapter/solution.js && alias x="node ./$chapter/my_solution.js"
63+
chapter=23 && mkdir ./$chapter && touch ./$chapter/my_solution.js && touch ./$chapter/solution.js && alias x="node ./$chapter/my_solution.js"
6364
```
6465

6566
<!--

0 commit comments

Comments
 (0)