11 June 2014

Data structures: Trees

A data structure is a particular way of storing and organizing data in a computer so that it can be used efficiently. Different kinds of data structures are suited to different kinds of applications, and some are highly specialized to specific tasks. The following is an overview of trees.

A tree data structure

A tree is a data structure that simulates a hierarchical tree structure with a set of linked nodes, where each node has a value and a list of references to other nodes (its children), with the constraint that no node is duplicated. There is also a requirement that no two references point to the same node (that each node has at most a single parent, and in fact exactly one parent, except for the root), and a tree that violates this is “corrupt”.

Read article

1 2 3 54


Data structures: Graphs


Data structures: Priority queues


Data structures: Heaps


Data structures: Queues and stacks


Data structures: Linked lists