Java Consultant Interview Questions

30,827 java consultant interview questions shared by candidates

"Suppose you have two different kinds of server requests - requests that MUST be responded to in 2 seconds and cannot be resent, and requests that can be responded to in 10 seconds, but can be resent. How would you handle the priority of responding to these requests?"
avatar

Back-end Java Engineer

Interviewed at Fanatics

3.3
May 20, 2016

"Suppose you have two different kinds of server requests - requests that MUST be responded to in 2 seconds and cannot be resent, and requests that can be responded to in 10 seconds, but can be resent. How would you handle the priority of responding to these requests?"

There is a group of n people. A serial killer comes and kills every kth person from the group and keeps on repeating this until there is only one person left and he spares the life of that person. Write an equation/algorithm which takes n and k as input and give the position of the guy who will be alive after the complete process. For eg: Let us assume there is a group of 13 (n) people and the serial killer kills every 3rd (k) person. The positions on which they are standing are marked 1 to 13. The order in which he kills will be: 3, 6, 9, 12, 2, 7, 11, 4, 10, 5, 1, 8. This way the guy on 13th positon will be saved.
avatar

Java Consultant

Interviewed at Xebia

3.8
Mar 5, 2016

There is a group of n people. A serial killer comes and kills every kth person from the group and keeps on repeating this until there is only one person left and he spares the life of that person. Write an equation/algorithm which takes n and k as input and give the position of the guy who will be alive after the complete process. For eg: Let us assume there is a group of 13 (n) people and the serial killer kills every 3rd (k) person. The positions on which they are standing are marked 1 to 13. The order in which he kills will be: 3, 6, 9, 12, 2, 7, 11, 4, 10, 5, 1, 8. This way the guy on 13th positon will be saved.

Viewing 311 - 320 interview questions

Glassdoor has 30,827 interview questions and reports from Java consultant interviews. Prepare for your interview. Get hired. Love your job.