Skip to content

Update triplet_sum.py #2404

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

Merged
merged 1 commit into from
Sep 6, 2020
Merged
Changes from all commits
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
4 changes: 2 additions & 2 deletions other/triplet_sum.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand Down