Software Engineering Interview Questions in San Jose, CA | Glassdoor

Find jobs for Software Engineering

Software Engineering Interview Questions in San Jose, CA

6,128

Software engineering interview questions shared by candidates

Top Interview Questions

Sort: RelevancePopular Date

You have two lightbulbs and a 100-storey building. You want to find the floor at which the bulbs will break when dropped. Find the floor using the least number of drops.

37 Answers

Start moving up in increments of 10 floors and dropping the bulb until it breaks (ie: drop from floor 10, if it doesn't break, drop from floor 20, etc.). Once the bulb breaks, move down to the floor above the last floor it broke on and start moving up floors in increments of one until the second bulb breaks. This results in a worst case scenario of 19 drops.

Surely a binary search method would be more efficient i.e. starting at 50 and either going up or down 25 floors based on if it breaks or not.

If you do a binary search, what happens if it breaks at floors 50 and 25?

There are three boxes, one contains only apples, one contains only oranges, and one contains both apples and oranges. The boxes have been incorrectly labeled such that no label identifies the actual contents of the box it labels. Opening just one box, and without looking in the box, you take out one piece of fruit. By looking at the fruit, how can you immediately label all of the boxes correctly?

42 Answers

Given the list of points of the skyline of a city in order (from East to West) Find the maximal rectangle contained in this skyline. I was asked to write the code. I managed to find the algorithm but was not sufficient.

21 Answers

Implement a function rotateArray(vector<int> arr, int r) which rotates the array by r places. Eg 1 2 3 4 5 on being rotated by 2 gives 4 5 1 2 3.

18 Answers

Given a list of n objects, write a function that outputs the minimum set of numbers that sum to at least K. FOLLOW UP: can you beat O(n ln n)?

15 Answers

Given the daily values of a stock, find how you can lose the most with one buy-sell trading.

14 Answers

Find a sequence with max sum in an array of negative and positive real numbers.

15 Answers

Phone interview 1 : a) Simulate a Queue with stacks ? b)Find repeated occurrence of character in a string ? Phone interview 2 : a) Given a 2D matrix of numbers find the position of number . Constraints of matrix number always in increasing order left to right and top to bottom . b)When should version control be used . And a tricky discreet math problem ?

13 Answers

Given an array of numbers, replace each number with the product of all the numbers in the array except the number itself *without* using division.

26 Answers

You are trying to rob houses on a street. Each house has some +ve amount of cash. Your goal is to rob houses such that you maximize the total robbed amount. The constraint is once you rob a house you cannot rob a house adjascent to that house.

14 Answers