Gap Inc. interview question

Asked 2 leetcode questions and their time and space complexities.