Sorted arrays
A (sub)array is sorted if its components are in ascending order, i.e., each component is less than or equal to the component on its right.
The meaning of the comparison “x is less than y” (or “y is greater than x”) must be defined for each data type.
Meaning of less for numbers:x is numerically less than y, i.e., x < y.
Conventional meaning of less for strings:x precedes y lexicographically.E.g.: “bat” is less than “bath”, which is less than “bay”.