package
0.0.0-20241126132414-a6474f9c9b52
Repository: https://github.com/talgat-ruby/exercises-go.git
Documentation: pkg.go.dev

# README

Problem 3

Create a Set data structure.

Methods:

  • Add

Add a new element to the Set.

  • Remove

Remove an existing element from the Set.

  • IsEmpty

Check if the Set is empty.

  • Size

Get the size of the Set.

  • List

Get the slice out of the Set.

  • Has

Check if an element is a member of a given Set.

  • Copy

Create a copy of the Set.

  • Difference

Given two sets A and B, the difference A – B consists of elements that are in Set A but not Set B.

  • IsSubset

Given two sets A and B, check if every element in Set B is in Set A.

  • Union

Given two or more sets, the union of the sets is the Set that consists of elements that are in any of those sets.

  • Intersect

Given two or more sets, the intersection of sets is the Set that consists of elements that are in all the sets.

! Please check the tests for signature and more examples.