Give a Data structure to store Name-value pair like name-age
"abc",12
"xyz",34...
such than insert(name,value), value = search(name), name = nthentry(n),
delete(name); all can be perfomed in O(1).
Note:- after deletion order should be maintained.Ex.
"ds",12
"df",78
"teu",54
"etr",12
If delete("df") is called then nthentry(2) should return "teu"


Please suggest the solution ..

-- 


Reply via email to