Last active
March 3, 2025 16:17
-
-
Save rwehresmann/0061606f4da8052c1786b15e81e42ad2 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| class CustomSet | |
| def initialize | |
| @elements = [] | |
| end | |
| def insert(element) | |
| @elements << element unless includes?(element) | |
| end | |
| def includes?(element) | |
| @elements.include?(element) | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment