Skip to content
← Back to glossary

データの並べ替えData Sorting

Learn in the textbookData Operations and Levels of Measurement

DefinitionData sorting (データの並べ替え) (sort (ソート)) is the operation of arranging data in order by a criterion such as the size of a number or which date comes first.

ExplanationArranging from smallest to largest is ascending order (昇順), and the reverse is descending order (降順). The item that decides the order is called the key (キー), and records that tie on the first key can be ordered further by a second key. Sorting leaves every value unchanged and only moves records to new positions.

AnalogyRearranging the books on a shelf by author name does not change what is inside a single book.

Memory hookAscending means climbing, as values do when they go up a staircase, and descending means walking back down it.