ThoughtfulGPT interview question

Complete 2 challenges. (at least)