OpenAI interview question

Coding like leetcode hard questions.