mirror of
https://github.com/TheAlgorithms/Python.git
synced 2026-02-04 11:27:12 +08:00
Update absMin.py
This commit is contained in:
@@ -6,7 +6,7 @@ def absMin(x):
|
||||
>>absMin([3,-10,-2])
|
||||
-2
|
||||
"""
|
||||
j = x[0]
|
||||
j = absVal(x[0])
|
||||
for i in x:
|
||||
if absVal(i) < j:
|
||||
j = i
|
||||
|
||||
Reference in New Issue
Block a user