i heard one of the method is using % and / as predicate when compare the elements, but i dont really understand why use % and /, may anyone explan for me, thx very much!
i heard one of the method is using % and / as predicate when compare the elements, but i dont really understand why use % and /, may anyone explan for me, thx very much!
1) Take a piece of data.
2) Take a less-than operator that does not use the entire piece of data in comparing.
3) Sort using that less-than operator, with some of the data comparing as equal while containing different parts.
4) Check to see if 'equal' elements' order is preserved.
For example, have your data be strings, and then sort by the lengths of the strings.