Skip to content

Instantly share code, notes, and snippets.

@ssartell

ssartell/26.cs Secret

Created July 19, 2019 15:58
Show Gist options
  • Save ssartell/f019a3d80103a16fe0392181ffa5e95f to your computer and use it in GitHub Desktop.
Save ssartell/f019a3d80103a16fe0392181ffa5e95f to your computer and use it in GitHub Desktop.
/* LINQ Puzzle #26 *******************************************************
Description: Given a list of tuples that represent intervals (start, end) that may or may not overlap. Find the number of intervals involved
in the largest simultaneous overlap.
Samples:
{(1, 3), (2, 8), (5, 9)} => 2
{(1, 5), (2, 3), (3, 22)} => 3
************************************************************************/
var input = new [] {(30, 75), (0, 50), (60, 150)};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment