mirror of
https://github.com/autistic-symposium/master-algorithms-py.git
synced 2025-04-29 20:26:07 -04:00
Update compare_2_tops.py
This commit is contained in:
parent
25054eabb1
commit
2ac7e9a678
@ -3,7 +3,7 @@
|
|||||||
# author: bt3gl
|
# author: bt3gl
|
||||||
|
|
||||||
|
|
||||||
```
|
'''
|
||||||
You are given an array of integers stones where
|
You are given an array of integers stones where
|
||||||
stones[i] is the weight of the ith stone.
|
stones[i] is the weight of the ith stone.
|
||||||
|
|
||||||
@ -18,8 +18,7 @@ of weight y has new weight y - x.
|
|||||||
At the end of the game, there is at most one stone left.
|
At the end of the game, there is at most one stone left.
|
||||||
|
|
||||||
Return the weight of the last remaining stone.
|
Return the weight of the last remaining stone.
|
||||||
If there are no stones left, return 0.
|
'''
|
||||||
```
|
|
||||||
|
|
||||||
def last_stone(stones) -> int:
|
def last_stone(stones) -> int:
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user