Robust string comparator
Filed under Netskope
The question
Design a robust string comparator that returns 1 if s1 > s2, 0 if s1 == s2, and -1 if s1 < s2, handling all edge cases such as null, empty, and different-sized strings.
No write-up yet. Related questions below have one.
Related Netskope questions
Collected from public candidate posts and coding forums. Updated Nov 2026.