Pretend the dashes are not there. Treat each as if it were a 7-digit number.
222-10-37
534-01-38 (5...
is greater than 2...)
534-10-36 (534-1 is greater than 534-0)
534-10-38 (534-10-38 is greater than 534-10-36)
535-01-38 (535- is greater than 534-)
535-11-38 (535-1 is greater than 535-0)
536-01-38 (536- is greater than 535-)
600-11-37 (6...
is greater than 5...)
As with any number ordering problem, you look at the left-most digit first. Only if those digits are equal do you look at the next digit to the right. Only if those digits are equal do you look at the next digit to the right. (repeat)
222-10-37
534-01-38 (5...
is greater than 2...)
534-10-36 (534-1 is greater than 534-0)
534-10-38 (534-10-38 is greater than 534-10-36)
535-01-38 (535- is greater than 534-)
535-11-38 (535-1 is greater than 535-0)
536-01-38 (536- is greater than 535-)
600-11-37 (6...
is greater than 5...)
As with any number ordering problem, you look at the left-most digit first. Only if those digits are equal do you look at the next digit to the right. Only if those digits are equal do you look at the next digit to the right. (repeat)