Decagon interview question

They asked a DSA question that involved array manipulation