Software Engineer Interview Questions

466,457 software engineer interview questions shared by candidates

You’re given a board game which is a row of squares, each labeled with an integer. This can be represented by a list, e.g. [1, 3, 2, 0, 5, 2, 8, 4, 1] Given a start position on the board, you “win” by landing on a zero, where you move by jumping from square to square either left or right the number of spaces specified on the square you’re currently on. Your task is to implement the function: def can_win(board, pos): returns True if you can win the board from that starting pos, False otherwise
avatar

Software Engineer

Interviewed at Pinterest

3.6
Aug 20, 2015

You’re given a board game which is a row of squares, each labeled with an integer. This can be represented by a list, e.g. [1, 3, 2, 0, 5, 2, 8, 4, 1] Given a start position on the board, you “win” by landing on a zero, where you move by jumping from square to square either left or right the number of spaces specified on the square you’re currently on. Your task is to implement the function: def can_win(board, pos): returns True if you can win the board from that starting pos, False otherwise

given a number as a string write a algorithm to map to its oral description. I.e. "1" -> "11" //this can be thought of as there is one one. "11" -> "21" // there are two ones "21" -> "1211" // there is one two and one one "1211" -> "111221" ect. //there is one one, one two and two ones
avatar

Software Engineer

Interviewed at Dropbox

3.9
Nov 5, 2011

given a number as a string write a algorithm to map to its oral description. I.e. "1" -> "11" //this can be thought of as there is one one. "11" -> "21" // there are two ones "21" -> "1211" // there is one two and one one "1211" -> "111221" ect. //there is one one, one two and two ones

You are going to take some numbers as an input from a file. You need to witer a program to find longest increasing sequence. You should process it as soon as you are taking an input. After finishing the last input immediately you should be able to tell the sequence. Input: 1 5 3 4 6 4 Output: 3 4 6
avatar

Software Engineer

Interviewed at Meta

3.6
Sep 4, 2010

You are going to take some numbers as an input from a file. You need to witer a program to find longest increasing sequence. You should process it as soon as you are taking an input. After finishing the last input immediately you should be able to tell the sequence. Input: 1 5 3 4 6 4 Output: 3 4 6

Given two unsigned integer values, write a function that returns the first divided by the second. You cannot (of course) use div or mod operators - only addition, subtraction and multiplication. Discuss the strengths/weaknesses/algorithmic complexity of your solution. Is there a better way to do it? If so, what, and what is its complexity?
avatar

Software Developer

Interviewed at Meta

3.6
Jul 30, 2015

Given two unsigned integer values, write a function that returns the first divided by the second. You cannot (of course) use div or mod operators - only addition, subtraction and multiplication. Discuss the strengths/weaknesses/algorithmic complexity of your solution. Is there a better way to do it? If so, what, and what is its complexity?

Given the following list of objects {user, loginTime, logoutTime}. What is the maximum number of concurrent users logged in at the same time? Input: [ {user: A, login: 1, logout: 3}, {user: B, login: 3, logout: 4}, {user: C, login: 1, logout: 2}, {user: D, login: 123123123, logout: 987987987}, {user: E, login: 1, logout: 3} ] Output: 3
avatar

Software Developer

Interviewed at Booking.com

4.1
Aug 24, 2016

Given the following list of objects {user, loginTime, logoutTime}. What is the maximum number of concurrent users logged in at the same time? Input: [ {user: A, login: 1, logout: 3}, {user: B, login: 3, logout: 4}, {user: C, login: 1, logout: 2}, {user: D, login: 123123123, logout: 987987987}, {user: E, login: 1, logout: 3} ] Output: 3

Viewing 451 - 460 interview questions

Glassdoor has 466,457 interview questions and reports from Software engineer interviews. Prepare for your interview. Get hired. Love your job.