For example I have following list var A = new List { 1, 4, 4, 4, 5, 3 };
I implemented as:
var res1 = from type in arr group typ