CVS Health interview question

Time complexity and space complexity of my code

CVS Health Interview Question: Time complexity and space complexity of my code | Glassdoor