Determine if a string can be segmented | TikTok Interview Question