Engineer intern Interview Questions | Glassdoor

Engineer intern Interview Questions


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

What was one of your best achievements on a project in the past?

19 Answers

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

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

13 Answers

If you have a refrigerator in an isolated room (no heat in or out) and left the door to the refrigerator open, what would happen to the temperature to the room? Would it go up, down or say the same?

13 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

To return the 'm' smallest numbers from a file of 'n' numbers

8 Answers

I was asked two questions. Q 1. You are given two version numbers of a software, like Version 10.3.4 and Version 10.3.41. Write a program to find out which of the version numbers are the latest. If version 1 is latest output -1, if version number 2 is latest output +1 else output 0 if same version. Both the version numbers are taken as string. He also asks to make the program of minimum time complexity as we can. At the end he also asked the difference between an iterative program and one with recurrence and their advantages and disadvantages. Q 2. Given two files with a list of application IDs (or some kind of data) stored in them , write a program to compare the data in the two files and output all the common data found in each. What data structure would you use and why ? Give a minimum time and space complexity algorithm. Why did you choose the particular data Structure or algorithm ?

7 Answers
110 of 1,406 Interview Questions