HashSet of Strings taking up too much memory, suggestions…?

前端 未结 8 1801
闹比i
闹比i 2020-12-29 08:44

I am currently storing a list of words (around 120,000) in a HashSet, for the purpose of using as a list to check enetered words against to see if they are spelt correctly,

8条回答
  •  囚心锁ツ
    2020-12-29 09:39

    You can also try Radix Tree(Wiki,Implementation) .This some what like trie but more memory efficient.

提交回复
热议问题