modify the insertionsort(method in insertsort java (listing so it counts the number of copies and the number of comparisons it makes during sort and displays the totals to count comparisonsyou'll need to break up the double condition in the inner while loop use this program to measure the number of copies and comparisons for different amounts of inversely sorted data do the results verify ( efficiencydo the same for almost-sorted data (only few items out of placewhat can you deduce about the efficiency of this algorithm for almost-sorted data here' an interesting way to remove duplicates from an array the insertion sort uses loop-within- -loop algorithm that compares every item in the array with every other item if you want to remove duplicatesthis is one way to start (see also exercise in modify the insertionsort(method in the insertsort java program so that it removes duplicates as it sorts here' one approachwhen duplicate is foundwrite over one of the duplicated items with key value less than any normally used (such as - if all the normal keys are positivethen the normal insertion sort algorithmtreating this new key like any other itemwill put it at index from now on the algorithm can ignore this item the next duplicate will go at index and so on when the sort is finishedall the removed dups (now represented by - valueswill be found at the beginning of the array the array can then be resized and shifted down so it starts at