efficiency and complexity we have already noted thatwhen developing algorithmsit is important to consider how efficient they areso we can make informed choices about which are best to use in particular circumstances sobefore moving on to study increasingly complex data structures and algorithmswe first look in more detail at how to measure and describe their efficiency time versus space complexity when creating software for serious applicationsthere is usually need to judge how quickly an algorithm or program can complete the given tasks for exampleif you are programming flight booking systemit will not be considered acceptable if the travel agent and customer have to wait for half an hour for transaction to complete it certainly has to be ensured that the waiting time is reasonable for the size of the problemand normally faster execution is better we talk about the time complexity of the algorithm as an indicator of how the execution time depends on the size of the data structure another important efficiency consideration is how much memory given program will require for particular taskthough with modern computers this tends to be less of an issue than it used to be here we talk about the space complexity as how the memory requirement depends on the size of the data structure for given taskthere are often algorithms which trade time for spaceand vice versa for examplewe will see thatas data storage devicehash tables have very good time complexity at the expense of using more memory than is needed by other algorithms it is usually up to the algorithm/program designer to decide how best to balance the trade-off for the application they are designing worst versus average complexity another thing that has to be decided when making efficiency considerations is whether it is the average case performance of an algorithm/program that is importantor whether it is more important to guarantee that even in the worst case the performance obeys certain rules for many applicationsthe average case is more importantbecause saving time overall is usually more important than guaranteeing good behaviour in the worst case howeverfor time-critical problemssuch as keeping track of aeroplanes in certain sectors of air spaceit may be totally unacceptable for the software to take too long if the worst case arises