Skip to content

Commit 464615a

Browse files
Update 0023-Merge-k-Sorted-Lists.md as per given
1 parent c726426 commit 464615a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

dsa-solutions/lc-solutions/0000-0099/0023-Merge-k-Sorted-Lists.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,13 @@ Merge all the linked-lists into one sorted linked-list and return it.
2424
- **Input:** `lists = [[1,4,5],[1,3,4],[2,6]]`
2525
- **Output:** `[1,1,2,3,4,4,5,6]`
2626
- **Explanation:** The linked-lists are:
27-
[
27+
`[
2828
1->4->5,
2929
1->3->4,
3030
2->6
31-
]
31+
]`
3232
merging them into one sorted list:
33-
1->1->2->3->4->4->5->6
33+
`1->1->2->3->4->4->5->6`
3434

3535
#### Example 2
3636

@@ -187,4 +187,4 @@ public:
187187
```
188188
189189
#### Conclusion
190-
The above solutions effectively merge k sorted linked lists into a single sorted list using a min-heap. This approach ensures that the smallest element is always added next to the merged list, maintaining sorted order. This solution efficiently handles edge cases and returns the correct merged list for various input configurations.
190+
The above solutions effectively merge k sorted linked lists into a single sorted list using a min-heap. This approach ensures that the smallest element is always added next to the merged list, maintaining sorted order. This solution efficiently handles edge cases and returns the correct merged list for various input configurations.

0 commit comments

Comments
 (0)