Compare two strings case-insensitively and output their lexicographic relationship.
You are given two strings of the same length. Compare them ignoring case and determine their lexicographic order.
-1.1.0.The comparison is made after converting both strings to the same case. In this problem, think of lowercase letters as being equal to their uppercase counterparts.
s.t.Print one integer:
-1 if s < t1 if s > t0 if s = tThe comparison is case-insensitive.
1 <= |s|, |t| <= 100|s| = |t|s and t consist only of Latin letters.Example 1
Input
aaaa AAAA
Output
0
Explanation
After ignoring case, both strings are identical.
Example 2
Input
abcdef ABCDEF
Output
0
Explanation
The strings are equal when compared case-insensitively.
Example 3
Input
aaaa zzzz
Output
-1
Explanation
At the first position, a comes before z.
Premium problem context
Premium adds guided hints, editorial links, similar variants, discussion resources, and concept maps so you can understand why a problem matters, not just solve it once.