Write a method called equals that takes two sets of integers as parameters and that returns true if the sets are equal. Two sets are considered equal if they store the same values. For example, given sets: s1: [5, 3, 1, 0] s2: [0, 1, 5, 3] s3: [1, 0, 5, 3, 4] The call equals(s1, s2) would return true while the calls equals(s1, s3) and equals(s2, s3) would return false. As in the examples above, you can not assume that the set values are ordered.
You are implementing a two-argument alternative to the standard Set method called equals, so you are not allowed to call that method or the containsAll method to solve this problem. You may construct iterator objects, but you are also not allowed to construct any structured objects to solve the problem (no set, list, stack, queue, string, etc). Your method should not change either of the sets passed as parameters.