NVIDIA Interview Question: Find the words used in some t... | Glassdoor

Interview Question

Senior Systems Software Engineer Interview San Jose, CA

Find the words used in some text and report by word length

  and how often each word appears.
data structures, collections

Interview Answer

1 Answer


Parse list to obtain words, whether space/comma/linebreak delimiter

ArrayList> where the word length will be the index of the ArrayList.

HashMap will have key as the single word in text and the value will be an Integer as the counter for how many times the word appears.

Lenovs on Feb 9, 2011

Add Answers or Comments

To comment on this, Sign In or Sign Up.