Data Structures and Algorithms: Week 6 - Analysis and Efficiency

LoadingLoading previews...
Analysis and Efficiency
HTML Creative Commons: Attribution-Noncommercial-No Derivative Works 4.0
View
    Analysis and Efficiency
    Analysis and Efficiency
    1 file in this resource
    Summary: Suppose we have a list of objects. If we want to locate a particular object in the list, then it would be easier to find the object if the list was sorted in some appropriate way. For example, a telephone directory is listed alphabetically and to find “John Smith ” we would jump to the “S’s” then to “Smith” and then to the “Johns”. We would then locate the correct “John Smith”, clearly, the list would not be so useful if it was sorted by telephone number or by the first line of the address. In some circumstances however, it may be appropriate to sort by telephone number and then check if that number has been allocated. If the list is not sorted, then to locate an object we would start at the beginning of the list and one by one check the list to see if the object is there. For small problems this does not really matter, but as the size of the list becomes larger, finding an item takes longer if the list is not sorted in some appropriate way.
    Creators:
    Divisions: Academic > School of Computing, Engineering and Built Environment > Department of Computing > Computing
    Copyright holder: Copyright © Glasgow Caledonian University
    Viewing permissions: World
    Depositing User:
    Date Deposited: 12 Apr 2019 14:33
    Last Modified: 06 Mar 2020 09:45
    URI: https://edshare.gcu.ac.uk/id/eprint/4836

    Actions (login required)

    View Item View Item

    Toolbox

    There are no actions available for this resource.