II. Improve the Sort Algorithm below
Create a class that uses the snippet of code below to sort an array a[].
First, determine which sort the algorithm below uses. Your job is to rewrite the code so that it implements a more efficient use of the of the sort you just identified. ie if you determine that code below is an implementation of MergeSort, rewrite the code to become a better implementation of MergeSort.
for(i = 0; i <a.length -1; i++)
for(j=i+1;j<a.length;j++)
if(a[i] > j[i])
swap();//implementation of swap not shown