C#
SortedSet<int> ts = new SortedSet<int>
{
11,
1,
13
};
//ts.Add(13); 重复的数据不会插入 也不会报错
int it =ts.Count;
while (it-- >0)
{
Console.Write(" " + ts.ElementAt(it) + " ");
}
Console.ReadLine();
输出: 13 11 1