mirror of
https://github.com/autistic-symposium/master-algorithms-py.git
synced 2025-04-29 12:16:14 -04:00
Update pivot_index_array.py
This commit is contained in:
parent
a4fe8d519e
commit
a37d96b756
@ -3,11 +3,9 @@
|
||||
# author: bt3gl
|
||||
|
||||
|
||||
def pivotIndex(nums):
|
||||
def pivot_index(nums):
|
||||
|
||||
s = sum(nums)
|
||||
|
||||
left_sum = 0
|
||||
s, left_sum = sum(nums), 0
|
||||
|
||||
for i, x in enumerate(nums):
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user