Software developer intern Interview Questions | Glassdoor

Software developer intern Interview Questions


software developer intern interview questions shared by candidates

Top Interview Questions

Sort: RelevancePopular 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?

59 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.

One or more comments have been removed.
Please see our Community Guidelines or Terms of Service for more information.

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

17 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.

11 Answers

Write a function in language of your choice that takes in two strings, and returns true if they match. Constraints are as follows: String 1, the text to match to, will be alphabets and digits. String 2, the pattern, will be alphabets, digits, '.' and '*'. '.' means either alphabet or digit will be considered as a "match". "*" means the previous character is repeat 0 or more # of times. For example: Text: Facebook Pattern: F.cebo*k returns true

8 Answers

What is the angle between the two arms of the clock at 2:40?

8 Answers

n= 20 for (i=0;i<n; i--) print i the question was to change or replace a only one character in for loop to print 20 times.

9 Answers

Questions related to data structures like "What data structure would you use for a browser's BACK & FORWARD ability"

7 Answers

Write a power function power(a , b) returns a^b

8 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

Write a function that finds the minimum and maximum values within an unsorted array using divide-and-conquer.

6 Answers
110 of 820 Interview Questions