Previous Module
Next Module

COMPUTER SYSTEMS: Encoding and compression

COMPUTER SYSTEMS: Network topologies

COMPUTER SYSTEMS: Wired and wireless networks, protocols, and layers

COMPUTER SYSTEMS: Threats to computer systems and networks

COMPUTER SYSTEMS: Operating systems and utility software

ALGORITHMS AND PROGRAMMING: Types of data

ALGORITHMS AND PROGRAMMING: Producing robust programs

ALGORITHMS AND PROGRAMMING: Designing, creating, and refining algorithms

  Method Use case Example
Bubble sort Repeatedly compare and swap adjacent elements until the list is sorted Small or nearly sorted lists

[4, 2, 3]

→ compare 4 & 2

→ swap

→ [2, 4, 3]

→ swap 4 & 3

→ [2, 3, 4]

Merge sort Split the list in half until each part has one element, then merge pairs back together in order Large lists needing efficient sorting

[6, 3, 9, 1]

→ split

→ merge sorted halves

→ [1, 3, 6, 9]

Insertion sort Build the sorted list one element at a time by placing each element in the correct position Small or nearly sorted lists

[4, 2, 5]

→ Insert 2 before 4

→ [2, 4]

→ Insert 5 after 4

→ [2, 4, 5]

Unlock Sorting algorithms

Subscribe to SnapRevise+ to get immediate access to the rest of this resource.

Premium accounts get immediate access to this resource.

Previous Module
Next Module