6 Mar 2018 by Maciej Los
Member 13711733[^] wrote: LongestRepetition(new [] {1, 2, 1, 2, 1, 2, 3, 2, 1, 2}) should return new [] {1, 2, 1, 2}. Why? It should logically return new [] {1, 2, 1, 2, 1, 2}, because it's a longest repetition. Check this generic linq solution: public static T[] GetLongestRepetition(T[]...