Jump to content

User talk:Mahadevan

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia

Use DataStructures Wisely



Data Structure-Advantages-Disadvantages


Array-Quick insertion, very fastaccess if index known-Slow search, slow deletion, fixed size.


Ordered array-Quicker search than unsorted array.-Slow insertion and deletion, fixed size.


Stack-Provides last-in, first-out access.-Slow access to other items.


Queue-Provides first-in, first-out access.-Slow access to other items.


Linked list-Quick insertion, quick deletion.-Slow search.


Binary tree-Quick search, insertion,deletion (if tree remains balanced).-Deletion algorithm is complex.


Red-black tree-Quick search, insertion, deletion. Tree always balanced.-Complex.


2-3-4 tree-Quick search, insertion, deletion. Tree always balanced. Similar trees good for disk storage.-Complex.


Hash table-Very fast access if key known. Fast insertion.-Slow deletion, access slow if key not known, inefficient memory usage.


Heap-Fast insertion, deletion-Slow access to other items.access to largest item.


Graph-Models real-world situations.-Some algorithms are slow and complex.



--Mahadevan 15:17, 6 Jan 2005 (UTC)

Start a discussion with Mahadevan

Start a discussion