data structures - Java : Datastructure to stock lots of words -


i have stock lots of word (+200k) in java program , want access them fast. need know if given word belongs "dictionary". don't need pair <word, smthg>. if possible i'm searching solution in standard library.

ps : maybe using data structure not better way ? reading each time file containing words more efficient ?

edit : it's small project. have deal effectiveness , memory

last edit : choose hashset.

use java sets because sets linear sorted data structure treeset. searching, techniques binary search can implemented , fast no repetition.

this structure of java sets.

enter image description here

also not going allow duplication hence reducing redundancy , save memory.

if want know various searching algorithms complexities refer link. here is

http://bigocheatsheet.com/


Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -