Skip to content
This repository was archived by the owner on Oct 13, 2025. It is now read-only.
This repository was archived by the owner on Oct 13, 2025. It is now read-only.

[Feature]: Implement set #2

@opabhijeet

Description

@opabhijeet

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

No one assigned

    Labels

    Issue:featureissue is created for new feature requestType:MediumPr is accepted with difficulty level as medium

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions