Software Interview Questions

550,133 software interview questions shared by candidates

Grid Illumination: Given an NxN grid with an array of lamp coordinates. Each lamp provides illumination to every square on their x axis, every square on their y axis, and every square that lies in their diagonal (think of a Queen in chess). Given an array of query coordinates, determine whether that point is illuminated or not. The catch is when checking a query all lamps adjacent to, or on, that query get turned off. The ranges for the variables/arrays were about: 10^3 < N < 10^9, 10^3 < lamps < 10^9, 10^3 < queries < 10^9.
avatar

Software Engineer Intern

Interviewed at Dropbox

3.9
Sep 29, 2016

Grid Illumination: Given an NxN grid with an array of lamp coordinates. Each lamp provides illumination to every square on their x axis, every square on their y axis, and every square that lies in their diagonal (think of a Queen in chess). Given an array of query coordinates, determine whether that point is illuminated or not. The catch is when checking a query all lamps adjacent to, or on, that query get turned off. The ranges for the variables/arrays were about: 10^3 < N < 10^9, 10^3 < lamps < 10^9, 10^3 < queries < 10^9.

You&#039;re given an array of numbers, and you want to find 3 numbers that sum to 0 and output those 3 numbers. You can use each number multiple times. So if you&#039;re given the array [-1, 1, 2], you would output [-1, -1, 2] because -1 -1 +2=0
avatar

Software Engineering Intern

Interviewed at Meta

3.6
Aug 6, 2015

You&#039;re given an array of numbers, and you want to find 3 numbers that sum to 0 and output those 3 numbers. You can use each number multiple times. So if you&#039;re given the array [-1, 1, 2], you would output [-1, -1, 2] because -1 -1 +2=0

for encoding that {a,b,c,...,z}<->{1,2,3,...,26} if given a list of digit e.g. [1,2,3], this may represent {1,2,3}->{a,b,c} or {12,3}->{l,c} or {1,23}->{a,w}. so there are 3 possible interpretations for list [1,2,3] so, given a list of digit, calculate the number of possible interpretations for the list.
avatar

Software Engineer Intern

Interviewed at Meta

3.6
Oct 3, 2016

for encoding that {a,b,c,...,z}<->{1,2,3,...,26} if given a list of digit e.g. [1,2,3], this may represent {1,2,3}->{a,b,c} or {12,3}->{l,c} or {1,23}->{a,w}. so there are 3 possible interpretations for list [1,2,3] so, given a list of digit, calculate the number of possible interpretations for the list.

Viewing 541 - 550 interview questions

Glassdoor has 550,133 interview questions and reports from Software interviews. Prepare for your interview. Get hired. Love your job.