Sobes.tech
Middle
2

// case 2 // реализовать экстеншен chunkwhile: // - объединяет соседние элементы в группы, пока samegroup(prev, current) == true. var data = new[] { 1, 3, 5, 2, 4, 4, 7 }; var chunks = data.chunkwhile((prev, curr) => (prev % 2) == (curr % 2)); foreach (var chunk in chunks) { console.writeline($"[{string.join(", ", chunk)}]"); } public static class case2class { public static ienumerable<ireadonlylist<t>> chunkwhile<t>( this ienumerable<t> source, func<t, t, bool> samegroup) { throw new notimplementedexception(); } }

Компании, где спрашивали
Чиббис