logo CodeStepByStep logo

SetMystery

Language/Type: C# SortedSet collections

What is the output of the following code?

SortedSet set = new SortedSet();
set.Add(74);
set.Add(12);
set.Add(74);
set.Add(74);
set.Add(43);
set.Remove(74);
set.Remove(999);
set.Remove(43);
set.Add(32);
set.Add(12);
set.Add(9);
set.Add(999);
Console.WriteLine(set);
output
(order shuffled)

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.