-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
32 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# Set | ||
|
||
*See implementation in* | ||
[C++](/concepts/cpp/set/README.md), | ||
Java, | ||
[Python](/concepts/python/set/README.md), | ||
[Typescript](/concepts/typescript/set/README.md) | ||
|
||
In computer science, a set is an abstract data type that can store certain values, without any particular order, and no repeated values, with two main operations: `Add`, which adds a value to the set, and `Contains`, which checks if a value is in the set. | ||
|
||
## Set Operations | ||
|
||
Here are some basic operations that you can perform on set: | ||
|
||
* `Add`: Add a value to the set | ||
* `Contains`: Check if a value is in the set | ||
* `Remove`: Remove a value from the set | ||
* `Union`: Return a new set that contains all the elements of the first set and the second set | ||
* `Intersection`: Return a new set that contains only the elements that are present in both sets | ||
* `Difference`: Return a new set that contains only the elements that are present in the first set and not in the second set | ||
|
||
|
||
## 🔗 Further Reading | ||
|
||
* [Set (abstract data type)](https://en.wikipedia.org/wiki/Set_(abstract_data_type)), wikipedia | ||
* ▶️ [Set in C++ STL](https://www.youtube.com/watch?v=4FJrP6aAwSs&ab_channel=Codevolution), GeeksforGeeks |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Sets | ||
# Set | ||
|
||
From wikipedia | ||
|
||
|
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters