mirror of
https://hub.njuu.cf/TheAlgorithms/Python.git
synced 2023-10-11 13:06:12 +08:00
Update triplet_sum.py (#2404)
This commit is contained in:
parent
3b1c4f72ce
commit
c0dcc556b3
@ -20,7 +20,7 @@ dataset = make_dataset()
|
||||
|
||||
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)
|
||||
|
Loading…
Reference in New Issue
Block a user