simple sorting programming projects writing programs that solve the programming projects helps to solidify your understanding of the material and demonstrates how the concepts are applied (as noted in the introductionqualified instructors may obtain completed solutions to the programming projects on the publisher' web site in the bubblesort java program (listing and the bubblesort workshop appletthe in index always goes from left to rightfinding the largest item and carrying it toward out on the right modify the bubblesort(method so that it' bidirectional this means the in index will first carry the largest item from left to right as beforebut when it reaches outit will reverse and carry the smallest item from right to left you'll need two outer indexesone on the right (the old outand another on the left add method called median(to the arrayins class in the insertsort java program (listing this method should return the median value in the array (recall that in group of numbers half are larger than the median and half are smaller do it the easy way to the insertsort java program (listing )add method called nodups(that removes duplicates from previously sorted array without disrupting the order (you can use the insertionsort(method to sort the dataor you can simply use main(to insert the data in sorted order one can imagine schemes in which all the items from the place where duplicate was discovered to the end of the array would be shifted down one space every time duplicate was discoveredbut this would lead to slow ( timeat least when there were lot of duplicates in your algorithmmake sure no item is moved more than onceno matter how many duplicates there are this will give you an algorithm with (ntime another simple sort is the odd-even sort the idea is to repeatedly make two passes through the array on the first pass you look at all the pairs of itemsa[jand [ + ]where is odd ( if their key values are out of orderyou swap them on the second pass you do the same for all the even values ( you do these two passes repeatedly until the array is sorted replace the bubblesort(method in bubblesort java (listing with an oddevensort(method make sure it works for varying amounts of data you'll need to figure out how many times to do the two passes the odd-even sort is actually useful in multiprocessing environmentwhere separate processor can operate on each odd pair simultaneously and then on each even pair because the odd pairs are independent of each othereach pair can be checked--and swappedif necessary--by different processor this makes for very fast sort