
A sorting algorithm is a step-by-step procedure that arranges items in a list into a specific order, such as from smallest to largest. Sorting matters because it makes data easier to work with and helps computers find information quickly.
AI-generated from the Wikipedia summary — may contain errors.
在計算機科學與數學中,一個排序算法(英語:Sorting algorithm)是一種能將一串資料依照特定排序方式排列的算法。最常用到的排序方式是數值順序以及字典順序。有效的排序算法在一些算法(例如搜尋算法與)中是重要的,如此這些算法才能得到正確解答。排序算法也用在處理文字資料以及產生人類可讀的輸出結果。基本上,排序算法的輸出必須遵守下列兩個原則: 1. * 輸出結果為遞增序列(遞增是針對所需的排序順序而言) 2. * 輸出結果是原輸入的一種排列、或是重組 雖然排序算法是一個簡單的問題,但是從計算機科學發展以來,在此問題上已經有大量的研究。舉例而言,泡沫排序在1956年就已經被研究。雖然大部分人認為這是一個已經被解決的問題,有用的新算法仍在不斷的被發明。(例子:圖書館排序在2004年被發表)
Abstract from DBpedia / Wikipedia · CC BY-SA
Discovered by embedding cosine similarity (sentence-transformers MiniLM, 384-dim).
via Wikidata sitelinks · CC0