two applications of sorted maps in this sectionwe explore applications in which there is particular advantage to using sorted map rather than traditional (unsortedmap to apply sorted mapkeys must come from domain that is totally ordered furthermoreto take advantage of the inexact or range searches afforded by sorted mapthere should be some reason why nearby keys have relevance to search flight databases there are several web sites on the internet that allow users to perform queries on flight databases to find flights between various citiestypically with the intent to buy ticket to make querya user specifies origin and destination citiesa departure dateand departure time to support such querieswe can model the flight database as mapwhere keys are flight objects that contain fields corresponding to these four parameters that isa key is tuple (origindestinationdatetimeadditional information about flightsuch as the flight numberthe number of seats still available in first (fand coach (yclassthe flight durationand the farecan be stored in the value object finding requested flight is not simply matter of finding an exact match for requested query although user typically wants to exactly match the origin and destination citieshe or she may have flexibility for the departure dateand certainly will have some flexibility for the departure time on specific day we can handle such query by ordering our keys lexicographically thenan efficient implementation for sorted map would be good way to satisfy usersqueries for instancegiven user query key kwe could call find ge(kto return the first flight between the desired citieshaving departure date and time matching the desired query or later better yetwith well-constructed keyswe could use find range( to find all flights within given range of times for exampleif (ordpvd may : )and (ordpvd may : ) respective call to find range( might result in the following sequence of key-value pairs(ordpvd may : (ordpvd may : (ordpvd may : (ordpvd may : (aa : )(aa : )(aa : )(aa :