I was wondering what my time and space complexity here would be for my solution, and if there are better approaches to solve this question.
Question: We want to find the