Adobe Interview Question for Software Engineer / Developers






Comment hidden because of low score. Click to expand.
4
of 4 vote

May be we should should use the synchronized mechanism to make the other timer wait till the first timer is done.

- Anonymous March 12, 2011 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

what if the situation is
at t = 0, setOStimer(10,fn,arg)
at t = 4, setOStimer(2,fn1,arg1).
here fn1 should be called before fn.

Possible solution is :
Make a list of all functions with extra field SRT(shortest remaining time)
after each second:
1.)Add new function in list (if any) with SRT=time provided with fn call;
2.)SRT-=1;
3.)If SRT==0 call function with setOStimer(0,fn,arg);

- gaurav August 04, 2012 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 vote

1st we've to ask interviewer if setOStimer is non-blocking call or blocking call.
If its blocking call then we just have to wait till first timer expires.
But i guess it should be a non-blocking call.
Now in ur own API, call the given API with timer=t1(=5).
After delta(=4sec in this case) another timer need to be started.
Check if (t1-delta > 0) then wait in some(u can maintain a while loop with this condition), once this condition fails(u can come to know about this thru some SW interrupt) then once again call the given API with timer=t2(=10 + t1-delta(=5))

- viks February 21, 2011 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

At some point of time, can I read the current value of the set timer?

- curiousMe March 07, 2011 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

At some point of time, can I read the current value of the set timer?

- curiousMe March 07, 2011 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

Use setOStimer () as periodic timer (of say 1 sec. We can achieve this by calling setOStimer in the callback fucntion).

Now, we can add new entries added via setTimer() into a wheel and use setOSTimer() as ticks.

I can think of few of approaches but whatever I just mentioned seems to be the most optimal.

- Akhil June 15, 2011 | Flag Reply


Add a Comment
Name:

Writing Code? Surround your code with {{{ and }}} to preserve whitespace.

Books

is a comprehensive book on getting a job at a top tech company, while focuses on dev interviews and does this for PMs.

Learn More

Videos

CareerCup's interview videos give you a real-life look at technical interviews. In these unscripted videos, watch how other candidates handle tough questions and how the interviewer thinks about their performance.

Learn More

Resume Review

Most engineers make critical mistakes on their resumes -- we can fix your resume with our custom resume review service. And, we use fellow engineers as our resume reviewers, so you can be sure that we "get" what you're saying.

Learn More

Mock Interviews

Our Mock Interviews will be conducted "in character" just like a real interview, and can focus on whatever topics you want. All our interviewers have worked for Microsoft, Google or Amazon, you know you'll get a true-to-life experience.

Learn More