logo CodeStepByStep logo


Language/Type: C# collections

Write a method named RemoveRange that accepts three parameters: a HashSet of integers, a minimum value, and a maximum value. The method should remove any values from the set that are between that minimum and maximum value, inclusive. For example, if a set named s contains {3, 17, -1, 4, 9, 2, 14}, the call of RemoveRange(s, 1, 10); should modify s to store {17, -1, 14}.

Method: Write a C# method as described, not a complete program or class.

You must log in before you can solve this problem.

Log In

Need help?

Stuck on an exercise? Contact your TA or instructor.

If something seems wrong with our site, please

Is there a problem? Contact us.