Amazon Interview Question
- 0of 0 votes
Create an employee database structure in which Employee has id, name, manager. Three functionalities required were- rahulkumar5july July 07, 2015 in United States
a) Given any id return all the employee details
b) Given any name(or id) list all the subordinates of the given employee.
c) Given a name search with prefix search property
We can use trie,make trie with names of employee,and store information of employee when name finish in trie,with this make a hashmap that hash id as key and name as value.
1st and 3rd condition is satisfied,but how to do 2nd ?
Any other approach that we can do?
only approach,no need of code.
| Report Duplicate | Flag | PURGE
Open Chat in New Window