K
kirthiga.narayanan
Hi,
I have a hash map with both the keys and the values as
strings...say emp id as the key and employee name as value.
eg: EMP1--->John Smith
EMP2---->AolSmith
Now I enter a search key say "Smith" or "th" or "S"
and I need to find out all the values in the map which contains the
search key. In the above examples, the values "John Smith" and
"AolSmith" have to be returned...
If the search Key is "h", then John Smith alone shud be returned...
Remember its a SUBSTRINGSEARCH.........
I can use Linear Search but when
the size of the map increases the performance decreases rapidly...
is there any other way to do it.......Please let me know ASAP.......
Even if means storing in a different data structure I dont mind....
Thanks
Kirthiga
I have a hash map with both the keys and the values as
strings...say emp id as the key and employee name as value.
eg: EMP1--->John Smith
EMP2---->AolSmith
Now I enter a search key say "Smith" or "th" or "S"
and I need to find out all the values in the map which contains the
search key. In the above examples, the values "John Smith" and
"AolSmith" have to be returned...
If the search Key is "h", then John Smith alone shud be returned...
Remember its a SUBSTRINGSEARCH.........
I can use Linear Search but when
the size of the map increases the performance decreases rapidly...
is there any other way to do it.......Please let me know ASAP.......
Even if means storing in a different data structure I dont mind....
Thanks
Kirthiga