Skip to content

Latest commit

 

History

History

challenge-39

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

Remove Consecutive Nodes that Sum to 0

This problem was asked by Uber.

Description

Given a list of integers, remove all consecutive nodes that sum up to 0.

Example

Input: [10, 5, -3, -3, 1, 4, -4]
Output: [10]