Choose a data structure to store the extracted words and

Interview Answer

2 Answers

▲

0

▼

HashMap

Interview Candidate on Nov 3, 2011

▲

0

▼

Keep it in a dictionary (python) or a hashmap (java) >

TO bring sentence back1) find the max location in the dictionary. Size of entire string = location + size of the word2) Create new char array new_blank_array[Size of entire string]3) traverse the dictionary and place the words as per their respective place.