This repository was archived by the owner on Oct 13, 2025. It is now read-only.
generated from OPCODE-Open-Spring-Fest/template
-
Notifications
You must be signed in to change notification settings - Fork 18
This repository was archived by the owner on Oct 13, 2025. It is now read-only.
[Feature]: Implement set #2
Copy link
Copy link
Open
Labels
Issue:featureissue is created for new feature requestissue is created for new feature requestType:MediumPr is accepted with difficulty level as mediumPr is accepted with difficulty level as medium
Description
Implement Set methods
- You have to implement set data structure without using any library ( not even iostream )
- You have to implement the functions mentioned in DSA_DOJO/Hard/Day1/Set.h
- You don't have to add any file and only need to modify DSA_DOJO/Hard/Day1/Set.h
- Set should be dynamic and should consist of Nodes
- Functions of the class should be defined outside the class
- You should handle all the exceptions that may occur
- You are free to add any other functionality
- You should not delete anything in DSA_DOJO/Hard/Day1/Set.h
- If your solution is found to be plagiarised heavy penalty would be imposed
- You would be given 8 working hours ( 2 Days ) to submit the solution
Functions that need to be implemented are:
- Set Union(Set &s) ---> return a set containing union of elements present in current set and s
- Set Intersection(Set &s) ---> return a set containing intersection of elements present in current set and s
- Set operator-(Set& s) ---> return the difference of two sets
- bool operator==(Set& s) ---> return true if both sets are equal and false otherwise
- void operator*(Set& s) ---> print the cartesian product of two sets
- T upper_bound(T num) ---> find upper bound of num in set
- T lower_bound(T num) ---> find lower bound of num in set
Code of Conduct
- I agree to follow this project's Code of Conduct
Metadata
Metadata
Assignees
Labels
Issue:featureissue is created for new feature requestissue is created for new feature requestType:MediumPr is accepted with difficulty level as mediumPr is accepted with difficulty level as medium