Edikted interview question

Test cases of actual challenges and how would I mitigate