Solve three string/stack/backtracking problems | TikTok Interview Question