[1, 5, 5, 2, 2] 4 0 0 0 0 1 2 2 2 2