problem of choosing the size of the buckets if they're too smallthey may overflowand if they're too largethey waste memory linked listswhich allocate memory dynamicallydon' have this problem java code for separate chaining the hashchain java program includes sortedlist class and an associated link class sorted lists don' speed up successful searchbut they do cut the time of an unsuccessful search in half (as soon as an item larger than the search key is reachedwhich on average is half the items in listthe search can be declared failure deletion times are also cut in halfhoweverinsertion times are lengthened because the new item can' just be inserted at the beginning of the listits proper place in the ordered list must be located before it' inserted if the lists are shortthe increase in insertion times may not be important if many unsuccessful searches are anticipatedit may be worthwhile to use the slightly more complicated sorted listrather than an unsorted list howeveran unsorted list is preferred if insertion speed is more important the hashchain java programshown in listing begins by constructing hash table with table size and number of items entered by the user the user can then insertfindand delete itemsand display the list for the entire hash table to be viewed on the screenthe size of the table must be no greater than or so listing the hashchain java program /hashchain java /demonstrates hash table with separate chaining /to run this programc:>java hashchainapp import java io *///////////////////////////////////////////////////////////////class link /(could be other itemsprivate int idata/data item public link next/next link in list /public link(int it/constructor idatait/public int getkey(return idata/public void displaylink(/display this link system out print(idata ")