Software Engineering Intern Interview Questions in San Jose, CA | Glassdoor

Find jobs for Software Engineering Intern

Software Engineering Intern Interview Questions in San Jose, CA


Software engineering intern interview questions shared by candidates

Top Interview Questions

Sort: RelevancePopular Date

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

7 Answers

do breadth first search from both ends at the same time. Keep a set of all nodes that each has reached. When the sets have any element in common, there is a path.

Does the above method have any advantage over the method in which we do bfs from one node of the nodes and stop when the other node is reached?

BFS from both sides is massively faster than just doing BFS from one. Suppose each person has k friends and that the two nodes are d apart. BFS from one node is O(k^d). BFS from both nodes is O(k^(d/2)) -- the exponent is half as big. To put some example numbers on it, if each person has 100 friends and they are 10 apart, then BFS from one node takes 10^20 operations, whereas BFS from both nodes is 2*100^5= 200 billion operations. BFS from one node is intractable. BFS from both nodes is slow, but tractable.

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

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

7 Answers

25 racehorses, no stopwatch. 5 tracks. Figure out the top three fastest horses in the fewest number of races.

11 Answers

Implement integer division without using / or %. Questions about running time. Can you do it faster?

6 Answers

Write a function in Java that will take a sorted array of ints, possibly with duplicates, and compact the array removing all the duplicate numbers. That is, if the contains the numbers - 1, 3, 7, 7, 8, 9, 9, 9, 10, then when the function returns, the contents should be - 1, 3, 7, 8, 9, 10. Be sure your answer is as efficient as possible. Describe the efficiency of your algorithm using big O notation.

5 Answers

Say you have a single-column table of entries of variable size. Implement this table to also contain methods to lengthen one cell, cut a cell shorter, and to return which cell we're pointing at if given a certain distance from the beginning of the table. All methods need to be fast (assume a single-column table with many many entries).

6 Answers

Given a list of "threads", which contain 2 variables - starting and ending times - implement a function that will return all running threads at some time t. Optimize it. (faster than O(n) )

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

7 Answers