Is it possible to sort a HashTable?

前端 未结 11 793
不知归路
不知归路 2021-01-17 10:13

I have a property that returns a HashTable. I would like to sort it without refactoring my property. Please note: I do not want to return another type.

11条回答
  •  别那么骄傲
    2021-01-17 10:57

    There is no point in sorting a hash table because you already have almost constant lookup time. Or at worst O(B) where B is the bucket size.

提交回复
热议问题