Skip to content

Commit

Permalink
Merge pull request #277 from gsafcik/feature/add-python-largest-sum-c…
Browse files Browse the repository at this point in the history
…onsecutive-nums

Added one-liner for issue #162
  • Loading branch information
wzhouwzhou authored Oct 31, 2018
2 parents 8b17210 + 68d6bbc commit 7bcf50c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,11 @@ Place: Curitiba, PR, Brazil </br>
Coding Experience: Python</br>
Email: [email protected] </br>

Name: [Geoff Safcik](https://github.com/gsafcik) </br>
Place: Denver, Colorado, USA </br>
Coding Experience: Python, PHP, SQL/MySQL, JavaScript, etc</br>
Email: [email protected] </br>

Name: Akashdeep Arora </br>
(akashdeep98.github.io)
Place: India
Expand Down
1 change: 1 addition & 0 deletions python/largest_sum_consecutive_nums_in_array.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
import itertools; print(0, list(itertools.accumulate([1, 4, -2, 6, -5, 3])).index(max(list(itertools.accumulate([1, 4, -2, 6, -5, 3]))))) # not very pythonic in my opinion but it is a one-liner

0 comments on commit 7bcf50c

Please sign in to comment.