FACTOID # 162: You are more likely to be reported as having been killed by lightning in Cuba than in any other country.
 
 Home   Encyclopedia   Statistics   Countries A-Z   Flags   Maps   Education   Forum   FAQ   About 
 
WHAT'S NEW
RECENT ARTICLES
More Recent Articles »
 

FACTS & STATISTICS    Simple view

  1. Select countries to view: (hold down Control key and click to select several)

     

     

    Compare:

     

     

  1. Select fact or statistic: (* = graphable)

     

     

     

  2. (OPTIONAL) Compare to statistic: (both need to be graphable)

     

     

     

  3. View result as:

     

       
(OR) SEARCH ALL encyclopedia, stats & forums:   

Encyclopedia > Set data structure

In computer science, the set is a collection of certain values without any particular order. It corresponds with the mathematical concept of set, but with the restriction that it has to be finite. Disregarding sequence, it is the same as a list. A set can be seen as an associative array where the value of each key-value pair is ignored.


Sets can be implemented using various data structures. Ideal set data structures make it efficient to check if an object is in the set, as well as enabling other useful operations such as iterating through all the objects in the set, performing a union or intersection of two sets, or taking the complement of a set in some limited domain. Popular methods include arrays (in particular bit arrays), hash tables, and any sort of tree structure. A Bloom map implements a set probabilistically, using a very compact representation but risking a small chance of false positives on queries. Any associative array data structure can be used to implement a set by letting the set of keys be the elements of the set and ignoring the values.


However, very few of these data structures support set operations such as union or intersection efficiently. For these operations, more specialized set data structures exist.


One of the earliest languages to support sets was Pascal; many languages now include it, whether in the core language or in a standard library. Java programming language offers Set interface to support sets. In C++, STL provides set classes.


  Results from FactBites:
 
Disjoint-set data structure - Wikipedia, the free encyclopedia (1435 words)
A disjoint-set data structure is a data structure that keeps track of such a partitioning.
In a disjoint-set forest, each set is represented by a tree data structure where each node holds a reference to its parent node.
Disjoint-set data structures arise naturally in many applications, particularly where some kind of partitioning or equivalence relation is involved, and this section discusses some of them.
Data structure (456 words)
A well-designed data structure allows a variety of critical operations to be performed on using as little resources, both execution time and memory space, as possible.
In the design of many types of programs, the choice of data structures is a primary design consideration, as experience in building large systems has shown that the difficulty of implementation and the quality and performance of the final result depends heavily on choosing the best data structure.
After the data structures are chosen, the algorithms to be used often become relatively obvious.
  More results at FactBites »


 

COMMENTARY     


Share your thoughts, questions and commentary here
Your name
Your comments
Please enter the 5-letter protection code

Want to know more?
Search encyclopedia, statistics and forums:

 


Lesson Plans | Student Area | Student FAQ | Reviews | Press Releases |  Feeds | Contact
The Wikipedia article included on this page is licensed under the GFDL.
Images may be subject to relevant owners' copyright.
All other elements are (c) copyright NationMaster.com 2003-5. All Rights Reserved.
Usage implies agreement with terms.