Developer Interview Questions

268,850 developer interview questions shared by candidates

You have a chest of 8 drawers. With probability 1/2, you put a letter in one of the drawers. With probability 1/2, you don't put a letter in any drawer. I open the first 7 drawers, all are empty. What is the probability there is a letter in the 8th drawer?
avatar

Quantitative Developer

Interviewed at JPMorganChase

3.9
May 1, 2012

You have a chest of 8 drawers. With probability 1/2, you put a letter in one of the drawers. With probability 1/2, you don't put a letter in any drawer. I open the first 7 drawers, all are empty. What is the probability there is a letter in the 8th drawer?

Take in an Int array and move all the zeroes to the end in place. It doesn’t matter how the non-zero numbers are ordered. Preferably as efficient and as space efficient as possible. Example: Input : [ 3, 0, 2, 0, 0, 4, 1, 0 ] Accepted Output: [ 4, 2, 3, 1, 0, 0, 0, 0 ]
avatar

IOS Developer

Interviewed at Meta

3.6
Dec 22, 2016

Take in an Int array and move all the zeroes to the end in place. It doesn’t matter how the non-zero numbers are ordered. Preferably as efficient and as space efficient as possible. Example: Input : [ 3, 0, 2, 0, 0, 4, 1, 0 ] Accepted Output: [ 4, 2, 3, 1, 0, 0, 0, 0 ]

Assume that you are given the head and tail pointers of a doubly linked list where each node can also have a single child pointer to another similar doubly linked list. There are no cycles in this structure outside of the traditional double links. Write a procedure in C++ that flattens this structure into a single list.

Assume that you are given the head and tail pointers of a doubly linked list where each node can also have a single child pointer to another similar doubly linked list. There are no cycles in this structure outside of the traditional double links. Write a procedure in C++ that flattens this structure into a single list.

1.Given two words find if they contains the same letters , if one letters occurs multiple times in word then second word also should have the number same number of times. eg: little and title are different, das and sad are equals. 2. Rearrange all the letter of a word in ascending order while removing the duplicate letters. eg:- letter should be printed elrt.
avatar

Java Developer

Interviewed at Maventic

4.1
Mar 20, 2017

1.Given two words find if they contains the same letters , if one letters occurs multiple times in word then second word also should have the number same number of times. eg: little and title are different, das and sad are equals. 2. Rearrange all the letter of a word in ascending order while removing the duplicate letters. eg:- letter should be printed elrt.

Viewing 101 - 110 interview questions

Glassdoor has 268,850 interview questions and reports from Developer interviews. Prepare for your interview. Get hired. Love your job.