This problem teaches you case-insensitive comparison. The tolower() function normalizes characters so you can compare them fairly. Without this step, uppercase letters would incorrectly rank as smaller than lowercase.
Character-by-character processing is a core string technique. Many string problems require you to iterate through positions and examine individual characters. This pattern appears constantly in competitions.
Return early when you find your answer. Once you detect a difference between characters, you know the result. Don't waste time checking remaining positions when the outcome is already determined.