Senior Developer Interview Questions

94,524 senior developer interview questions shared by candidates

We have m slots for ads and n ads, each ads will have different revenue on differnet slot, design an algorithm to find out the best fit (find m ads in n ads and order them so that they can make max money, white board coding) .
avatar

Senior Software Engineer

Interviewed at Google

4.4
Jan 15, 2011

We have m slots for ads and n ads, each ads will have different revenue on differnet slot, design an algorithm to find out the best fit (find m ads in n ads and order them so that they can make max money, white board coding) .

1) I have class hierarchy and should create array of different instances of this hierarchy. They asked me to write a function which iterates this array and executes different methods according to the instance class. I suggested that downcasting is a bad idea and that it can violate Liskov substitution rule of the SOLID principles, and this problem should be solved using collections and generics, but they did not accept this answer 2) Create Queue N size using only N size array. 3) some Java concurrency related questions: synchronized volatile, atomic, etc....
avatar

Senior Software Engineer

Interviewed at Taboola

4.2
Dec 6, 2015

1) I have class hierarchy and should create array of different instances of this hierarchy. They asked me to write a function which iterates this array and executes different methods according to the instance class. I suggested that downcasting is a bad idea and that it can violate Liskov substitution rule of the SOLID principles, and this problem should be solved using collections and generics, but they did not accept this answer 2) Create Queue N size using only N size array. 3) some Java concurrency related questions: synchronized volatile, atomic, etc....

Viewing 151 - 160 interview questions

Glassdoor has 94,524 interview questions and reports from Senior developer interviews. Prepare for your interview. Get hired. Love your job.