ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/Array-Heap/README
(Generate patch)

Comparing Array-Heap/README (file contents):
Revision 1.4 by root, Mon Oct 27 22:33:50 2014 UTC vs.
Revision 1.5 by root, Tue Jul 14 23:28:10 2015 UTC

113 will sort according to the first element of the arrays, i.e. "1,2,3". 113 will sort according to the first element of the arrays, i.e. "1,2,3".
114 114
115 The custom comparison functions work similar to how "sort" works: $a and 115 The custom comparison functions work similar to how "sort" works: $a and
116 $b are set to the elements to be compared, and the result should be 116 $b are set to the elements to be compared, and the result should be
117 greater than zero then $a is greater than $b, 0 otherwise. This means 117 greater than zero then $a is greater than $b, 0 otherwise. This means
118 that you cna use the same function as for sorting the array, but you 118 that you can use the same function as for sorting the array, but you
119 could also use a simpler function that just does "$a > $b". 119 could also use a simpler function that just does "$a > $b".
120 120
121 The first example above corresponds to this comparison "function": 121 The first example above corresponds to this comparison "function":
122 122
123 { $a <=> $b } 123 { $a <=> $b }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines