TikTok Interview Question

String searches and involved island searches.