Use Treemap/sets for performance