The Wayback Machine - https://web.archive.org/web/20201126010724/https://github.com/TheAlgorithms/Python/pull/2404/files
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update triplet_sum.py #2404

Merged
merged 1 commit into from Sep 6, 2020
Merged
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.
@@ -20,7 +20,7 @@ def make_dataset() -> Tuple[List[int], int]:

def triplet_sum1(arr: List[int], target: int) -> Tuple[int, int, int]:
"""
Returns a triplet in in array with sum equal to target,
Returns a triplet in the array with sum equal to target,
else (0, 0, 0).
>>> triplet_sum1([13, 29, 7, 23, 5], 35)
(5, 7, 23)
@@ -39,7 +39,7 @@ def triplet_sum1(arr: List[int], target: int) -> Tuple[int, int, int]:

def triplet_sum2(arr: List[int], target: int) -> Tuple[int, int, int]:
"""
Returns a triplet in in array with sum equal to target,
Returns a triplet in the array with sum equal to target,
else (0, 0, 0).
>>> triplet_sum2([13, 29, 7, 23, 5], 35)
(5, 7, 23)
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.