Timeline for Why do some sorting methods sort by 1, 10, 2, 3...?
Current License: CC BY-SA 3.0
2 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
May 29, 2021 at 10:43 | comment | added | dreftymac |
//1, 2, 10 makes sense to you but not to a computer that only knows alphabetic comparison// in many programming languages, this is handled by data type. For example, 1,2,10 also makes sense to a computer if the values are all of type integer . The part that does not "make sense" is non-standardized treatment of strings that do not unambiguously map to type integer (e.g., abc123xyz). In some contexts, standards do actually exist for this type of issue, though, such as ISO 8601
|
|
Dec 30, 2011 at 2:41 | history | answered | Nicole | CC BY-SA 3.0 |