Programmer Trainee Interview Questions

712,403 programmer trainee interview questions shared by candidates

Implement clearbit(int n, int p) function, p is the position of the bit to be cleared. Example : n is 13, p is 0. Binary representation of n : 1101. You need to clear the pth postion, means 0th position bit needs to be cleared.
avatar

Software Development Engineer In Test

Interviewed at Amazon

3.5
Apr 11, 2011

Implement clearbit(int n, int p) function, p is the position of the bit to be cleared. Example : n is 13, p is 0. Binary representation of n : 1101. You need to clear the pth postion, means 0th position bit needs to be cleared.

Here is the brain teaser question: Given integers as 1, 2, 3, 4, ..., N. Every time you remove an alternative element until only one is left. If you reach the end, just do a rounding. Return the remaining element. For example, given 1,2,3,4,5,6, you remove 1, 3, 5 and then 2, 6. So the remaining element is 4. What is the remaining element if N is 2000?
avatar

Software Engineer

Interviewed at Turn

3.7
Mar 15, 2014

Here is the brain teaser question: Given integers as 1, 2, 3, 4, ..., N. Every time you remove an alternative element until only one is left. If you reach the end, just do a rounding. Return the remaining element. For example, given 1,2,3,4,5,6, you remove 1, 3, 5 and then 2, 6. So the remaining element is 4. What is the remaining element if N is 2000?

Viewing 581 - 590 interview questions

Glassdoor has 712,403 interview questions and reports from Programmer trainee interviews. Prepare for your interview. Get hired. Love your job.