Skip to content

Instantly share code, notes, and snippets.

@ssartell

ssartell/23.cs Secret

Created June 7, 2019 15:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ssartell/4749a6fe1816d88380dc922df4a1f2c4 to your computer and use it in GitHub Desktop.
Save ssartell/4749a6fe1816d88380dc922df4a1f2c4 to your computer and use it in GitHub Desktop.
/* LINQ Puzzle #23 *******************************************************
Summary: Given a list integers, is there a non-empty subset that adds up to 0?
Sample: { 1, 2, -3 } => true
{ 1, 1, -1 } => true
{ -7, -3, -2, 8 } => false
************************************************************************/
var ints = new[] { -7, -3, -2, 5, 8 };
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment