Adobe Interview Report
- 0of 0 votes
one system API available setOStimer(time n, function ptr, function arg)- santosh February 13, 2011
it sets time for n sec. after expiration of timer it calls function.
if another timer set with setOStimer, it will erase previously sets timer.
Ex. at t = 0, setOStimer(5,fn,arg)
at t = 4, setOStimer(10,fn1,arg1)
now first timer removed.
Question is using this API, write own API setTimer(), it will use given API. So that it will not erase previously set timer.
I gave solution using min heap. as soon as min value become zero call given API.But he is not convince with my answer. Most of the time i feel that he is trying to confuse me, when i tried for any answer.
Because of 3rd round i am not selected
| Report Duplicate | Flag | PURGE
Adobe Software Engineer / Developer Operating System
Open Chat in New Window