Bubble Sort Program, Algorithm & their Time Complexity

Bubble Sort program, Algorithm & their time complexity.In this tutorial, We are going to learn about bubble sort algorithm and their implementation in various programming languages.

In this tutorial, we are going to cover following things

  • What is Bubble Sort?
  • Bubble sort algorithm & it’s time complexity
  • Bubble sort program in C & C++
  • Bubble sort implementation in PHP

 

What is Bubble Sort?

Bubble sort is a sorting algorithm, It works by comparing each pair of adjacent elements and switching their positions if necessary. It repeats this process until all the elements are sorted.

C Program to Swap two Numbers without using third variable

Write a c program to swap two numbers without using third variable. Given two input numbers, We have to write a code to swap two numbers without using third variable. In my previous post, I have explained a c program to swap two numbers using third variable. This question is generally asked in an interview.

Programming questions on linked list

Swap two numbers using Bitwise XOR Operator