Software Development Engineer Intern Interview Questions | Glassdoor

Software Development Engineer Intern Interview Questions


Software development engineer 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

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 function that takes in an array and repeats an integer that appears the most.

5 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

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

Given an array of integers, all but one of which appears an even number of times, find the one integer which appears an odd number of times. Upon completion, asked to improve the algorithm in terms of both time and space, eventually asked to do it in O(n) time and constant space.

4 Answers
110 of 303 Interview Questions