Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Fix sphinx/build_docs warnings for greedy_methods (TheAlgorithms#12463)
* updating DIRECTORY.md

* Fix sphinx/build_docs warnings for greedy_methods

* Improve

---------

Co-authored-by: MaximSmolskiy <MaximSmolskiy@users.noreply.github.com>
  • Loading branch information
MaximSmolskiy and MaximSmolskiy authored Dec 23, 2024
commit b0cb13fea54854b3a60eced27026db9a9c5dc5ab
3 changes: 2 additions & 1 deletion greedy_methods/smallest_range.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,13 @@ def smallest_range(nums: list[list[int]]) -> list[int]:
Uses min heap for efficiency. The range includes at least one number from each list.

Args:
nums: List of k sorted integer lists.
`nums`: List of k sorted integer lists.

Returns:
list: Smallest range as a two-element list.

Examples:

>>> smallest_range([[4, 10, 15, 24, 26], [0, 9, 12, 20], [5, 18, 22, 30]])
[20, 24]
>>> smallest_range([[1, 2, 3], [1, 2, 3], [1, 2, 3]])
Expand Down