Palo Alto Networks interview question

Q: shuffle an array, then implement optimization