1 / 7

Data Structures

Data Structures. 1-D arrays, linearly-linked lists and binary search trees. Overview. This slide show discusses 1-D arrays and compares them with two sorts of linked list, linearly linked lists and binary search trees in regard to their properties in relation to (a) insertion,

gayora
Download Presentation

Data Structures

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Data Structures 1-D arrays, linearly-linked lists and binary search trees

  2. Overview This slide show discusses 1-D arrays and compares them with two sorts of linked list, linearly linked lists and binary search trees in regard to their properties in relation to (a) insertion, (b) deletion and (c) searching.

  3. 1-D arrays • Can’t dynamically grow and shrink. (-) • Difficult to insert and delete. (-) • Extraordinarily good searching of sorted arrays, of the order of log2n where n is the number of elements in the array. (+)

  4. Linear linked lists • Can grow and shrink dynamically.(+) • Easy to insert and delete. (+) • Extremely bad search time, making them useless if used to provide long lists. (-)

  5. Binary Search Trees • Can grow and shrink dynamically. (+) • Easy to insert and delete. (+) • Easy to search, even for extremely long lists. (+)

  6. Conclusion Binary search trees come out on tops as having all the advantages and none of the disadvantages. Now go to the last slide to see the summary sheet.

  7. Summary Sheet

More Related