Software Developer Intern Interview Questions | Glassdoor

Software Developer Intern Interview Questions


Software developer intern interview questions shared by candidates

Top Interview Questions

Sort: Relevance Popular Date

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

11 Answers

Correct answer is to place each value in the array in its corresponding index (i.e. if array[x] = 3, put 3 into array[3]). If an index already contains its corresponding value, there's a duplicate.

^^ Sorry, that's linear time *and* at best linear space, you fail.

What are the properties of an array that affect time complexity? Usually we're talking about the size of the array, N, such that linear time operations, O(N), are those that perform an operation on each of the elements in the array. However, an important thing to consider is that you can evaluate N (the size of the array) itself in constant time. The only way this can be done in constant time is if the input satisfies the precondition that "1..n" means there are no *missing* values in that range. In other words, such an array from "1..5" must contain at least one instance of the numbers 1, 2, 3, 4, and 5. With that precondition, you know that the length of the array will be 5 if no duplicates and greater than 5 if it does contain duplicates.

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

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.

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

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

8 Answers

Write a program to find the square root of a double.

5 Answers

Given the head pointers to two linked lists of unknown length, find the node of intersection if they do intersect.

5 Answers

Write a function that takes in an array and repeats an integer that appears the most.

5 Answers

Make a program that writes a Binary Search Tree to a file. Now create a program that reads those files and recreates a Binary Search Tree.

5 Answers

Write a program that sees if two binary trees are equal.

6 Answers
110 of 544 Interview Questions