puddlejumper26 / blogs

Personal Tech Blogs
4 stars 1 forks source link

Abstract Data types - Set #116

Open puddlejumper26 opened 4 years ago

puddlejumper26 commented 4 years ago

In computer science, a set is an abstract data type that can store unique values, without any particular order. It is a computer implementation of the mathematical concept of a finite set. Unlike most other collection types, rather than retrieving a specific element from a set, one typically tests a value for membership in a set.

Some set data structures are designed for static or frozen sets that do not change after they are constructed. Static sets allow only query operations on their elements — such as checking whether a given value is in the set, or enumerating the values in some arbitrary order. Other variants, called dynamic or mutable sets, allow also the insertion and deletion of elements from the set.

A multiset is a special kind of set in which an element can figure several times.

Reference

[1] https://en.wikipedia.org/wiki/Set_(abstract_data_type)