/*Integer Array
(6, 4, 10, 3, 0, 1)
SORT THIS ARRAY
Two Pre Conditions
1. You cannot use another array. Sort within the same array.
2. You cannot use any pre-defined SORT methods. Write your own.*/
using System;
public class Program
{
public static void Main()
int[] arr = {6, 4, 10, -3, 0, 1};
for(int i=0 ; i < arr.Length;i++)
for(int k = 0 ; k < arr.Length-1 ; k++)
if(arr[i] < arr[k]){
int temp = arr[i];
arr[i] = arr[k];
arr[k] = temp;
}
for(int i =0 ; i < arr.Length;i++){
Console.WriteLine(" "+arr[i]);