ok so I have this geek question that is must be debatable. If I have a web page and want to count how many words repeated and how its long? for example:
" java is a great.... bla bla bla" ... "java is ...bla bla bla"
Now, I have
7 … 3
java … is
2 2
"java" repeated twice and has 7 indices. so do "is" repeated twice in the web page and has 3 indices. The output index consists of two integers separated by a colon like java is 7:2 The first number before the colon represents the word’s ID, and the second number is the word's frequency (means, how many times the word has occurred in the web [age.) My question is, which data structure should be using here and why? I was thing of hashcode as i can use it to count times of a word repeated... but not sure if it would be so sufficient