Difference between revisions of "Manuals/calci/SORTING"

From ZCubes Wiki
Jump to navigation Jump to search
(Created page with "<div style="font-size:30px">'''SORTING(Array,Ascending)'''</div><br/> *where <math>Array</math> is set of numbers to be sorted, *<math>Ascending</math> is the value that deci...")
 
 
Line 15: Line 15:
  
 
#SORTING([5,9,15,2,106,344],1) = 2 5 9 15 106 344
 
#SORTING([5,9,15,2,106,344],1) = 2 5 9 15 106 344
 
+
#SORTING([-3,5.5,0.025,-44],1) = -44 -3 0.025 5.5
 +
#SORTING([56.3,4/5,21,7.645],0) = 56.3 21 7.645 0.8
  
 
==Related Videos==
 
==Related Videos==

Latest revision as of 05:42, 13 April 2017

SORTING(Array,Ascending)


  • where is set of numbers to be sorted,
  • is the value that decides whether numbers should be sorted in ascending or descending order.

Description

  • This function sorts the array of numbers in either ascending or descending order.
  • Sorting means arranging a set of data in some order.
  • For non-zero value of , the numbers are sorted in ascending order.
  • If is 0, the numbers are sorted in descending order.


Examples

  1. SORTING([5,9,15,2,106,344],1) = 2 5 9 15 106 344
  2. SORTING([-3,5.5,0.025,-44],1) = -44 -3 0.025 5.5
  3. SORTING([56.3,4/5,21,7.645],0) = 56.3 21 7.645 0.8

Related Videos

SORTING

See also

References

Sorting Algorithm