Skip to content

Instantly share code, notes, and snippets.

@ssartell

ssartell/24.cs Secret

Created June 14, 2019 15:14
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
/* LINQ Puzzle #24 *******************************************************
Summary: Given a list integers, find the sum of all numbers in list where the index of
the number equals the number at that index
Sample: { 6, 5, 4, 3, 2, 1, 6 } => 9
{ 0, 1, 1, 3 } => 4
************************************************************************/
var input = new [] { 6, 1, 5, 2, 4, 8, 7, 7, 2, 6, 10 };
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment