S
shrishjain
Hi All,
I need a type where I can store my items in sorted order. And I want to
keep adding items to it, and want it to remain sorted. Is there any
type in .net which I can make use of.
I see there is SortedList<key, value> for hash tables, but could find
anything for a sorted list.
Currently I am using List<string> and whenever I add an item, I need to
call Sort() and it takes a long time - Order(nlogn). If the list is
already sorted, it will take just Order - logn. Does someone know if
there is a type where I can so such stuff.
Thanks,
Shrish
I need a type where I can store my items in sorted order. And I want to
keep adding items to it, and want it to remain sorted. Is there any
type in .net which I can make use of.
I see there is SortedList<key, value> for hash tables, but could find
anything for a sorted list.
Currently I am using List<string> and whenever I add an item, I need to
call Sort() and it takes a long time - Order(nlogn). If the list is
already sorted, it will take just Order - logn. Does someone know if
there is a type where I can so such stuff.
Thanks,
Shrish