Software Intern Interview Questions | Glassdoor

Software Intern Interview Questions


Software intern interview questions shared by candidates

Top Interview Questions

Sort: Relevance Popular Date

Suppose you had eight identical balls. One of them is slightly heavier and you are given a balance scale . What's the fewest number of times you have to use the scale to find the heavier ball?

44 Answers

3 times. (2^3 = 8)

Two. Split into three groups of three, three, and two. weigh the two groups of three against each other. If equal, weigh the group of two to find the heavier. If one group of three is heavier pick two of the three and compare them to find the heaviest.

Brian - this would be correct if you in fact were using a weighing scale, and not a balance scale. The ability to weigh one group against another with a balance scale allows Marty's answer to be a correct answer. Although - the question as worded provides a loophole. If it had been worded as "What's the fewest number of times you have to use the scale to CONSISTENTLY find the heavier ball", then Marty's answer would be the only correct answer. However, it is possible that you could get lucky and find the heavier ball in the first comparison. Therefore, the answer to the question as stated, is ONE.

Implement a power function to raise a double to an int power, including negative powers.

11 Answers

To find and return the common node of two linked lists merged into a 'Y' shape.

13 Answers

Determine if an array from 1..n has a duplicate in constant time and space.

11 Answers

There are 20 floors in a building. If you're on an elevator and you're trying to get to the 20th floor, what is the probability that 4 people ahead of you click the 20th floor before you do? Assuming you click last.

9 Answers

Given two strings representing integer numbers ("123" , "30") return a string representing the sum of the two numbers ("153")

12 Answers

how would you find the shortest path between two nodes in a social network?

7 Answers

Generate a new array from an array of numbers. Start from the beginning. Put the number of some number first, and then that number. For example, from array 1, 1, 2, 3, 3, 1 You should get 2, 1, 1, 2, 2, 3, 1, 1 Write a program to solve this problem.

7 Answers

Given a sorted array, write a program to decide if two elements sum up to a third.

9 Answers

You are given an array with n positive integers where all values in the array are repeated except for one. Return the one that is not repeated.

7 Answers
110 of 1,405 Interview Questions