Skip to content

Instantly share code, notes, and snippets.

@ssartell

ssartell/4.cs Secret

Created July 11, 2016 21:34
Embed
What would you like to do?
/* LINQ Puzzle #4 *******************************************************
Description: Given a collection of objects and an integer n, cluster every n objects together.
Sample Input: {0, 0, 0, 0, 0, 0, 0}; n = 3;
Sample Output: {{0, 0, 0}, {0, 0, 0}, {0}}
************************************************************************/
// Given:
var input = Enumerable.Repeat(0, 15).ToList();
var n = 5;
// Your solution goes here:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment