Determine whether two strings are equivalent after applying the problem’s comparison rule.
You are given two strings. Decide whether they should be considered the same under the comparison rule described by the task.
A typical version of this problem asks you to compare two strings character by character and print whether they are equal or which one comes first according to lexicographic order, sometimes ignoring letter case. The key idea is to scan both strings directly without any heavy data structure.
This is a straightforward string-processing exercise that tests careful implementation and attention to comparison details.
Example 1
Input
abc abc
Output
0
Explanation
The strings are identical, so the comparison result is equality.
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.