Epic interview question

Based on strings