Sorting of arrays in C#
- Perl has a built-in sort() function to sort an array of alphabets and numbers. When an array is passed to the sort() function it returns a sorted array.
Sorting of Arrays in Perl can be done in multiple ways:
- Use of ASCII values to sort an Array
- Use of Comparison function (cmp)
- Alphabetical order of Sorting(Case insensitive)
- Sorting of an Array of Numbers
Use of ASCII values to sort an Array
- As the ASCII values of the upper case letters are less than that of the lowercase letters, all the values with the uppercase are arranged before the lower case values start.
No comments