Besonderhede van voorbeeld: -4963240098295740903

Metadata

Data

English[en]
The algorithm proceeds by finding the smallest (or largest, depending on sorting order) element in the unsorted sublist, exchanging (swapping) it with the leftmost unsorted element (putting it in sorted order), and moving the sublist boundaries one element to the right. The time efficiency of selection sort is quadratic, so there are a number of sorting techniques which have better time complexity than selection sort.
Thai[th]
การเรียงลําดับแบบเลือก ในสาขาวิทยาการคอมพิวเตอร์ การเรียงลําดับแบบเลือก () เป็นขั้นตอนวิธีการเรียงลําดับอย่างง่ายโดยใช้วิธีการเปรียบเทียบ ทํางานโดยการหาค่าเหมาะสมที่สุด (ค่ามากสุดหรือน้อยสุด) ที่อยู่ในรายการส่วนที่ยังไม่เรียงและนําค่าเหมาะที่สุดนั้นมาต่อท้ายของส่วนที่เรียงแล้ว ก็จะทําให้ส่วนที่เรียงแล้วมีขนาดใหญ่ขึ้นทีละหนึ่งในแต่ละรอบการทํางาน

History

Your action: