Petya and Strings
Practice this coding question on Coding Gurukul.
Problem statement
An alphabetical directory compares two equal-length names without considering letter case. Convert letters conceptually to lowercase and report whether the first name comes before, equals, or comes after the second name.
Input format
Two lines: equal-length English-letter strings.
Output format
Print -1 if the first is smaller, 0 if equal, or 1 if larger.
Constraints
1 <= length <= 100; uppercase and lowercase English letters only.
Sample input
AbCd aBcD
Sample output
0
Sign in to run or submit a solution in C++, Java or Python.