-
-
Save ssartell/e73aa44aba249c94561a75b80e6e3697 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* LINQ Puzzle #6 ******************************************************* | |
Description: Given a collection of objects and an integer n, create n clusters of objects. The size of each cluster should vary by no more than 1. | |
Sample Input: {0, 0, 0, 0, 0, 0, 0, 0, 0}; n = 4; | |
Sample Output: {{0, 0, 0}, {0, 0}, {0, 0}, {0, 0}}; | |
************************************************************************/ | |
// Given: | |
var values = Enumerable.Range(0, 7).ToList(); | |
var n = 4; | |
// Your solution goes here: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment