user82677: In python there is the object set that resembles a mathematical set, namely, you can remove elements from it, add elements to it, you can calculate the intersection/union between two sets, etc.
Is there a library or built-in functions that have those capabilities? I have been unlucky because when I use the word "set" as query term for the engine search, it always sends me to something related to the verb to set.

user10794: The Standard Template Library (STL) can be installed on the Arduino. It is not there by default. That includes things like sets.
One implementation is here.

82677: <p>In python there is the object set that resembles a mathematical set, namely, you can remove elements from it, add elements to it, you can calculate the intersection/union between two sets, etc.</p>
<p>Is there a library or built-in functions that have those capabilities? I have been unlucky because when I use the word &quot;set&quot; as query term for the engine search, it always sends me to something related to the verb to set.</p>
 10794: <p>The Standard Template Library (STL) can be installed on the Arduino. It is not there by default. That includes things like sets.</p>
<p>One implementation is <a href="https://www.arduino.cc/reference/en/libraries/arduinostl/" rel="noreferrer">here</a>.</p>
