Suppose I have tuple like 1,2,3,4,5.
1,2,3,4,5
I want to group it like 1,1,0 that is (1 group of 2), (1 group of 3) and (0 groups of 4).
1,1,0
The result