In computer programming, a set is an abstract data structure that stores a list of unique values. Depending on the type of implementation, the set of values can either be ordered or unordered. A set data structure normally has some utility functions that can add non-duplicate values, remove existing values, and check if a value already exists in the set. Sets are commonly utilized in various computer application fields such as data analysis and algorithms. They are mainly used to perform operations on sets of values efficiently and systematically.
This technical note will discuss how to implement a basic Set class in v20. It will be hash-based, meaning the class will use hash tables to store its set of values in no particular order. Only text and number values will be accepted, but the class will be extensible for additional value types. The Set class will have five main functions—“add”, “has”, “delete”, “clear”, and “collection”—and an additional “size” property.
Download Complete Tech Note: Tech Note Document