Linux kernel engineering interview questions shared by candidates
You have 25 horses, what is the minimum number of races you can find the top 3. In one race you can race 5 horses, and you don't have a timer.
I don't know, but Google it, you'll find the answer. Once you know it, it's obvious.
Probably 8. First answer: at least 5 (you have to look at every horse). Second answer: 11. You can race five horses, replace 4th and 5th place horse by two horses from pool of horses that haven't raced, and continue doing this until all horses have raced. Since there are 25 horses, you need 1 race for the first five horses and 10 to go through the remaining 20. Third answer: 8. Round 1 (5 heats) : Race horses in heats of five. Eliminate all 4th and 5th place horses. (15 horses left) Round 2 (1 heat): Race winning horses from every heat. Eliminate 2nd and third place horses that lost to horses in round 2 that came third or worse. (7 horses left). Round 3 (1 heat): Pick any five horses. Race them. Eliminate bottom two and replace with remaining two horses. (5 horses left) Round 4 (1 heat): Eliminate bottom two. Note: after round 2 it may be possible to use some interesting decision tree mechanism to determine the three fastest horses using fewer horses per heat but you still need two heats to do that. This problem assumes horses don't get tired, no ties are possible and a horse's speed is deterministic race after race after race. Good assumptions for brain teasers, but not for real life.
Whats is Stack overflow attack??...then he gave me a scenario where there was a open source code at a server and you have your piece of code at that server. You as a client are allowed to invoke a method which takes in a array as a parameter which is not checked for overflow validation. I had to induce a buffer overflow attack and make the method to pass control to my piece of code in the server.
What kind of experience have you had in the past working with linux What is an inline function/ volatile/static keywords (basic C functions to gauge your competency)
See Interview Questions for Similar Jobs
- Software Engineer
- Senior Software Engineer
- Software Developer
- Software Development Engineer
- Site Reliability Engineer
- Systems Engineer
- Software Engineer III
- Software Engineer Intern
- Firmware Engineer
- Production Engineer
- Business Development Engineer
- Member of Technical Staff