mirror of
https://github.com/autistic-symposium/master-algorithms-py.git
synced 2025-05-22 08:21:12 -04:00
Update pivot_index_array.py
This commit is contained in:
parent
a4fe8d519e
commit
a37d96b756
1 changed files with 2 additions and 4 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue