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