arr insert( )arr insert( )arr insert( )arr insert( )arr insert( )arr insert( )arr insert( )arr insert( )arr insert( )/insert items int searchkey /search for item ifarr find(searchkey!arr size(system out println("found searchkey)else system out println("can' find searchkey)arr display()/display items arr delete( )arr delete( )arr delete( )/delete items arr display()/end main(/display items again /end class orderedapp advantages of ordered arrays what have we gained by using an ordered arraythe major advantage is that search times are much faster than in an unordered array the disadvantage is that insertion takes longerbecause all the data items with higher key value must be moved up to make room deletions are slow in both ordered and unordered arraysbecause items must be moved down to fill the hole left by the deleted item ordered arrays are therefore useful in situations in which searches are frequentbut insertions and deletions are not an ordered array might be appropriate for database of company employeesfor example hiring new employees and laying off existing ones would probably be infrequent occurrences compared with accessing an existing employee' record for information or updating it to reflect changes in salaryaddressand so on retail store inventoryon the other handwould not be good candidate for an ordered array because the frequent insertions and deletionsas items arrived in the store and were soldwould run slowly logarithms in this section we'll explain how logarithms are used to calculate the number of steps necessary in binary search if you're math majoryou can probably skip this section if math makes you break out in rashyou can also skip itexcept for taking longhard look at table