table summarizes the running times of the algorithms we've discussed so far figure graphs some big relationships between time and number of items based on this graphwe might rate the various big values (very subjectivelylike thiso( is excellento(log nis goodo(nis fairand ( is poor ( occurs in the bubble sort and also in certain graph algorithms that we'll look at later in this book the idea in big notation isn' to give an actual figure for running timebut to convey how the running times are affected by the number of items this is the most meaningful way to compare algorithmsexcept perhaps actually measuring running times in real installation why not use arrays for everythingthey seem to get the job doneso why not use arrays for all data storagewe've already seen some of their disadvantages in an unordered array you can insert items quicklyin ( timebut searching takes slow (ntime in an ordered array you can search quicklyin (logntimebut insertion takes (ntime for both kinds of arraysdeletion takes (ntimebecause half the items (on the averagemust be moved to fill in the hole it would be nice if there were data structures that could do everything--insertiondeletionand searching--quicklyideally in ( timebut if not thatthen in (logntime in the aheadwe'll see how closely this ideal can be approachedand the price that must be paid in complexity another problem with arrays is that their size is fixed when the array is first created with new usually when the program first startsyou don' know exactly how many items will be placed in the array later onso you guess how big it should be if your guess is too largeyou'll waste memory by having cells in the array that are never filled if your guess is too smallyou'll overflow the arraycausing at best message to the program' userand at worst program crash other data structures are more flexible and can expand to hold the number of items inserted in them the linked listdiscussed in "linked lists,is such structure we should mention that java includes class called vector that acts much like an array but is expandable this added capability comes at the expense of some loss of efficiency