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