Skip to main content
Brave Programmer Logo

BraveProgrammer

BraveProgrammer

HomeProjectsBlogsCoursesLessonsAbout

Site footer

BraveProgrammer

Free coding courses, practical tutorials, and real projects from BraveProgrammer. Learn web development with React, Next.js, and TypeScript.

Navigation

  • Home
  • Projects
  • Blogs
  • Courses

Resources

  • About
  • Lessons

© 2026 BraveProgrammer. All rights reserved.

  1. Courses
  2. /
  3. C Programming Fundamentals

Lesson 34 of 50 · c

Sorting Algorithms – Bubble, Selection, Insertion

Duration: 12 mins

Sorting puts data into a defined order. Below are three classic O(n²) algorithms, good for learning fundamentals.

Bubble Sort – repeatedly swap adjacent out‑of‑order elements. Selection Sort – repeatedly select the minimum element and place it at the front. Insertion Sort – build the sorted portion one element at a time.

All work on arrays and are stable (except selection, which can be made stable with extra work).

Previous: Binary Trees – Basic OperationsNext: Sorting Algorithms – QuickSort & MergeSort