final result be like this -
index elements
0 66
1 7
2 20
3 32
4 50
5 77
input sequence = {7, 20, 32, 50, 66, 77}
h(k)=k mod 6 | | | | | |
v v v v v v
1 2 2 2 0 5
So therefore order of there coming can be
66, 77, 7 are independent they can come anywhere in any order.
20→32→50 this order has to be maintained.
out of 6 3 places has to chooses and then rest 3 places any order
i.e. 6C3 * 3! = 120.