Rediet8abere / CS-1.3-Core-Data-Structures

MIT License
0 stars 0 forks source link

Submission 6: Set and Set operations #6

Open Sukhrobjon opened 4 years ago

Sukhrobjon commented 4 years ago
  1. Set ADT Structures
    • Clean code and implementation are correct.
  2. Set ADT Operations
    • It looks good, but you implemented is_subset logic in the opposite way. you are supposed to find the if other_set is a subset of self set. so when you loop through, basically what you need to do is change from
      for ele in other_set_key:
          if self.contains(ele):
              count += 1
      return count == other_set.size

      to this

      
      for ele in self.keys():
          if not other_set.contains(ele):
              return 

but you are fine to pass.