This is an easy problem. But to solve this,
you need to code a lot of topics of data structure such as
binary search, quick-sort.
After
building the dictionary take each word, search it in the
dictionary and if found, then add its value with the salary. I
use binary search. And for this I need to sort the dictionary.
For sorting I use quick-sort.
|