Sort an array in C (Basic Method)

Complexity : O(n2)

Explanation:

Below code picks a cell one by one and compares with each other cells , if value of current cell is greater than other cell then it will swap with other value. Similarly it performs untill picked cell is last cell.

Code :