Chope interview question

Leetcode coding on array manipulation promotions