Thursday, July 03, 2025 02:47

Posts Tagged ‘sorted set’

Sorted Set

Saturday, June 16th, 2018

Sorted Set is the preferred data structure when we want to have sorted items and also to eliminate duplicate elements. Unfortunately, its performance is worse than that of a Hash Set or a Dictionary. The following program declares a new Sorted Set and adds elements to it:

using System;
using System.Collections.Generic;
Read more