Software Engineer Interview Questions

466,586 software engineer interview questions shared by candidates

Given two words as Strings, determine if they are isomorphic. Two words are called isomorphic if the letters in one word can be remapped to get the second word. Remapping a letter means replacing all occurrences of it with another letter while the ordering of the letters remains unchanged. No two letters may map to the same letter, but a letter may map to itself. * * Example: * given "foo", "app"; returns true * we can map 'f' -> 'a' and 'o' -> 'p' * * given "foo", "boa"; returns false * we can map 'f' -> 'b', 'o' -> 'o', we can't map 'o' -> 'a' * * given "bar", "foo"; returns false * we can't map both 'a' and 'r' to 'o' * * given "turtle", "tletur"; returns true * we can map 't' -> 't', 'u' -> 'l', 'r' -> 'e', 'l' -> 'u', 'e' ->'r' * * given "ab", "ca"; returns true * we can map 'a' -> 'c', 'b' -> 'a' */
avatar

Software Engineer

Interviewed at LinkedIn

3.8
May 29, 2015

Given two words as Strings, determine if they are isomorphic. Two words are called isomorphic if the letters in one word can be remapped to get the second word. Remapping a letter means replacing all occurrences of it with another letter while the ordering of the letters remains unchanged. No two letters may map to the same letter, but a letter may map to itself. * * Example: * given "foo", "app"; returns true * we can map 'f' -> 'a' and 'o' -> 'p' * * given "foo", "boa"; returns false * we can map 'f' -> 'b', 'o' -> 'o', we can't map 'o' -> 'a' * * given "bar", "foo"; returns false * we can't map both 'a' and 'r' to 'o' * * given "turtle", "tletur"; returns true * we can map 't' -> 't', 'u' -> 'l', 'r' -> 'e', 'l' -> 'u', 'e' ->'r' * * given "ab", "ca"; returns true * we can map 'a' -> 'c', 'b' -> 'a' */

If you had twelve identical looking-balls except that one weighed more or less than the other 11, and could weigh the balls (or any subset) three times, how can you find the correct ball and whether it weighed more or less?
avatar

Software Developer

Interviewed at JPMorganChase

3.9
Sep 27, 2011

If you had twelve identical looking-balls except that one weighed more or less than the other 11, and could weigh the balls (or any subset) three times, how can you find the correct ball and whether it weighed more or less?

Phone Interview: The question was very open ended and related to Matrix (Basically, a form of Graph) Traversal, had to figure it out the exact requirements first and then come up with the sol. with the time constraints. P.S: I couldn't make it through the Phone Interview
avatar

Software Engineer- Early Career

Interviewed at Google

4.4
Aug 18, 2021

Phone Interview: The question was very open ended and related to Matrix (Basically, a form of Graph) Traversal, had to figure it out the exact requirements first and then come up with the sol. with the time constraints. P.S: I couldn't make it through the Phone Interview

Surprisingly the questions were found on the famous cracking the code interview. Like : find the lowest common ancestors of two nodes in a binary tree. (O(n) time). If each node has a pointer to parent, solve the problem in o(logn) time and o(1) space.
avatar

Software Engineer

Interviewed at Google

4.4
Sep 24, 2012

Surprisingly the questions were found on the famous cracking the code interview. Like : find the lowest common ancestors of two nodes in a binary tree. (O(n) time). If each node has a pointer to parent, solve the problem in o(logn) time and o(1) space.

Third person: Given a 2-d array, write code to print it out in a snake pattern. For example, if the array is this: 1, 2, 3 4, 5, 6 7, 8, 9 the routine prints this: 1,2,3,6,9,8,7,4,5 The array is an NxN array. The final question was just how to write a connection pool (i.e, a class that returns connections to the user, and if the user is done, returns them back to the pool)
avatar

Software Engineer

Interviewed at Google

4.4
Feb 28, 2013

Third person: Given a 2-d array, write code to print it out in a snake pattern. For example, if the array is this: 1, 2, 3 4, 5, 6 7, 8, 9 the routine prints this: 1,2,3,6,9,8,7,4,5 The array is an NxN array. The final question was just how to write a connection pool (i.e, a class that returns connections to the user, and if the user is done, returns them back to the pool)

1. Given a preorder traversal, create a binary search tree in optimized time 2. Implement hasNext and next for a list of lists 3. Given a circle with N defined points and a point M outside the circle, find the point that is closest to M among the set of N. O(LogN) 4. Given two sets of intervals, return a combined set 5. Threading related questions
avatar

Software Engineer

Interviewed at Google

4.4
Feb 19, 2013

1. Given a preorder traversal, create a binary search tree in optimized time 2. Implement hasNext and next for a list of lists 3. Given a circle with N defined points and a point M outside the circle, find the point that is closest to M among the set of N. O(LogN) 4. Given two sets of intervals, return a combined set 5. Threading related questions

Viewing 881 - 890 interview questions

Glassdoor has 466,586 interview questions and reports from Software engineer interviews. Prepare for your interview. Get hired. Love your job.