Sorting — Formula Sheet
Himachal Pradesh Board · Class 12 · Computer Science
3 formulas from Sorting (Himachal Pradesh Board Class 12 Computer Science) on one page, grouped by topic. Covers Core idea of sorting, Bubble Sort.
Interactive on Super Tutor
Studying Sorting? Get the full interactive chapter.
Quizzes, flashcards, AI doubt-solver and a step-by-step study plan — built for formula sheet and more.
Free trial, no card needed.

Learn better with visuals Super Tutor pairs illustrations like this with notes and quizzes for Sorting.
Formulas and Key Relations
Bubble Sort
WHILE i < n REPEAT STEPS 3 to 8; WHILE j < n - i - 1, REPEAT STEPS 5 to 7; IF numList[j] > numList[j+1] THEN swap(numList[j], numList[j+1])
Selection Sort
SET min = i, flag = 0; WHILE j < n: IF numList[j] < numList[min] THEN min = j, flag = 1; IF flag = 1 THEN swap(numList[i], numList[min])
Insertion Sort
temp = numList[i]; SET j = i-1; WHILE j > 0 and numList[j] > temp: numList[j+1] = numList[j]; SET j=j-1; numList[j+1] = temp
Full sheet with units and worked examples
View AllFrequently Asked Questions
What are the important topics in Sorting for Himachal Pradesh Board Class 12 Computer Science?
How many formulas are in Sorting?
How should I revise Sorting for the Himachal Pradesh Board Class 12 board exam?
Sources & Official References
Content is aligned to the official syllabus. Refer to the board website for the latest curriculum.
More resources for Sorting
Practice Quiz
Test yourself with a quick quiz
Important Questions
Exam-style questions with answers
Revision Notes
Key points for last-minute revision
Chapter Summary
Understand the chapter at a glance
Concept Maps
See how topics connect
Study Plan
Step-by-step plan for this chapter
Flashcards
Quick-fire cards for active recall
Syllabus
What topics to cover
NCERT Solutions
Every textbook question solved step by step
For serious students
Get the full Sorting chapter — start free.
Quizzes, flashcards, an AI doubt solver and a study plan for Himachal Pradesh Board Class 12 Computer Science. Free to start, no card needed.