arrays of coursefor the baseball playersduplicate numbers should not be allowed keeping track of the players would be hard if more than one wore the same number the array workshop applet lets you select either option when you use new to create new arrayyou're prompted to specify both its size and whether duplicates are permitted use the radio buttons dups ok or no dups to make this selection if you're writing data storage program in which duplicates are not allowedyou may need to guard against human error during an insertion by checking all the data items in the array to ensure that none of them already has the same key value as the item being inserted this check is inefficienthoweverand increases the number of steps required for an insertion from one to for this reasonour applet does not perform this check searching with duplicates allowing duplicates complicates the search algorithmas we noted even if it finds matchit must continue looking for possible additional matches until the last occupied cell at leastthis is one approachyou could also stop after the first match how you proceed depends on whether the question is "find me everyone with blue eyesor "find me someone with blue eyes when the dups ok button is selectedthe applet takes the first approachfinding all items matching the search key this approach always requires steps because the algorithm must go all the way to the last occupied cell insertion with duplicates insertion is the same with duplicates allowed as when they're nota single step inserts the new item but rememberif duplicates are not allowedand there' possibility the user will attempt to input the same key twiceyou may need to check every existing item before doing an insertion deletion with duplicates deletion may be more complicated when duplicates are alloweddepending on exactly how "deletionis defined if it means to delete only the first item with specified valuethenon the averageonly / comparisons and / moves are necessary this is the same as when no duplicates are allowed ifhoweverdeletion means to delete every item with specified key valuethe same operation may require multiple deletions such an operation will require checking cells and (probablymoving more than / cells the average depends on how the duplicates are distributed throughout the array the applet assumes this second meaning and deletes multiple items with the same key this is complicated because each time an item is deletedsubsequent items must be shifted farther for exampleif three items are deletedthen items beyond the last