Skip to content · ⁨ข้ามไปยังเนื้อหา⁩

Sorting: bubble, selection, and insertion · ⁨Sorting: bubble, selection, และ insertion⁩

English

Putting an array in order

  • Sorting rearranges an array so the items go from smallest to largest.
  • We sort in place: we move items around inside the same array, with no return value.
  • Three classic methods do this: bubble, insertion, and selection sort.
ไทย

การเรียง array เป็นระเบียบ

  • การเรียงลำดับ (Sorting) จัดเรียงอาร์เรย์เพื่อให้รายการเรียงจากน้อยไปมาก
  • เรารับ Sort ในสถานที่ (In place): เราย้ายข้อมูลภายในอาร์เรย์เดิม โดยไม่มีค่าที่คืนกลับมา
  • มีวิธีคลาสสิกสามแบบที่ทำสิ่งนี้: Bubble, Insertion และ Selection sort

Handout · ⁨เอกสารประกอบการเรียน⁩

Log in or create account · ⁨เข้าสู่ระบบหรือสร้างบัญชี⁩

IGCSE, A-Level & AP