Software Development Engineer Interview Questions | Glassdoor

Software Development Engineer Interview Questions


Software development engineer interview questions shared by candidates

Top Interview Questions

Sort: RelevancePopular Date

Write an algorithm to determine if 2 linked lists intersect

15 Answers

The first answer is simply looping through every item in list one checking it against all items in list 2 until you find a match. This is O(n2) and you'll be asked to improve it. Think about other data structures with faster access to improve this algorithm.

^ Use a HashMap? We could traverse and put every node we see in a hashmap

@PixelPerfect3 Yes, a hashtable would do the job. Just put every node from one of the lists into a hashtable then traverse the other list checking to see if each node exists in the hashmap. This would then be in O(n) time with the downside of using more memory for the hashtable.

Find the deepest common ancestor of two nodes in a tree structure.

13 Answers

The Game of Nim worded diffently.

11 Answers

Most of them were expected. Almost all are problem solving questions. 1. Given a BST with following property find the LCA of two given nodes. Property : All children has information about their parents but the parents do not have information about their children nodes. Constraint - no additional space can be used

15 Answers

Number of 1's in binary representation of integer?

13 Answers

Implement a function to validate whether a given binary tree is a BST (i.e. write an isBST() function).

9 Answers

Given a set of numbers -50 to 50, find all pairs that add up to a certain sum that is passed in. What's the O notation for what you just wrote? Can you make it faster? Can you find an O(n) solution? Implement the O(n) solution

17 Answers

List all anagrams in a file. Assumptions: case-insensitive, a-z characters only, one word per line. For example, if the file contains dog, cat, ddd, goo, act, god -- output dog, god, act, cat

10 Answers

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

13 Answers

Determine whether the binary representation of a number if a palindrome or not, code it on a white board.

13 Answers
110 of 4,165 Interview Questions