Concept Flow - Spaceship operator (<=>)
Compare a and b
Is a < b?
Yes→Return -1
No
Is a == b?
Yes→Return 0
No
Return 1 (a > b)
The spaceship operator compares two values and returns -1, 0, or 1 depending on whether the first is less than, equal to, or greater than the second.