Software Engineering Interview Questions

56,373 software engineering interview questions shared by candidates

You have a single branch of a GIT or SVN repository. At some commit number G, the code in the repo worked (G = good commit). At a later commit number B, you noticed that the code was broken (B = bad). The code may have become broken anytime at or before B, but after G. B was just the first time that you noticed the code was broken. Both G and B are positive integers and G < B. You have access to a function.......bool isCommitGood(integer)......... that takes a commit number and tells you whether the code at that commit worked or was broken. Write code to find the most recent working commit (i.e., the number/index of the last good commit before the code became broken).
avatar

Software Engineering New Grad

Interviewed at Meta

3.6
Oct 27, 2015

You have a single branch of a GIT or SVN repository. At some commit number G, the code in the repo worked (G = good commit). At a later commit number B, you noticed that the code was broken (B = bad). The code may have become broken anytime at or before B, but after G. B was just the first time that you noticed the code was broken. Both G and B are positive integers and G < B. You have access to a function.......bool isCommitGood(integer)......... that takes a commit number and tells you whether the code at that commit worked or was broken. Write code to find the most recent working commit (i.e., the number/index of the last good commit before the code became broken).

The abstract class question was posed differently- he said something along the lines of "Suppose you have an interface in which certain aspects of the implementation could be defined and those would carry over to classes implementing it- when do you think that would be useful?" ."
avatar

Software Engineering Intern

Interviewed at Intuit

4.2
Dec 12, 2013

The abstract class question was posed differently- he said something along the lines of "Suppose you have an interface in which certain aspects of the implementation could be defined and those would carry over to classes implementing it- when do you think that would be useful?" ."

I was asked a puzzle .. You have 12 balls identical in size and appearance but 1 is an odd weight (could be either light or heavy). You have a set of scales (balance) which will give 3 possible readings: Left = Right, Left &gt; Right or Left &lt; Right (ie Left and Right have equal weight, Left is Heavier, or Left is Lighter). You have only 3 chances to weigh the balls in any combination using the scales. Determine which ball is the odd one and if it's heavier or lighter than the rest. How do you do it?
avatar

Engineering

Interviewed at Amazon

3.5
Feb 4, 2010

I was asked a puzzle .. You have 12 balls identical in size and appearance but 1 is an odd weight (could be either light or heavy). You have a set of scales (balance) which will give 3 possible readings: Left = Right, Left &gt; Right or Left &lt; Right (ie Left and Right have equal weight, Left is Heavier, or Left is Lighter). You have only 3 chances to weigh the balls in any combination using the scales. Determine which ball is the odd one and if it's heavier or lighter than the rest. How do you do it?

Viewing 741 - 750 interview questions

Glassdoor has 56,373 interview questions and reports from Software engineering interviews. Prepare for your interview. Get hired. Love your job.