Software Development Engineer New Grad Interview Questions

6,135 software development engineer new grad 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).

Viewing 121 - 130 interview questions

See Interview Questions for Similar Jobs

Glassdoor has 6,135 interview questions and reports from Software development engineer new grad interviews. Prepare for your interview. Get hired. Love your job.