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' */
Software Engineer Interview Questions
420,038 software engineer interview questions shared by candidates
Implement double pow(double a, int b) without using any already built-in functions (aka, don't use an already defined pow function).
Why Rakuten? If a system problem occurs at midnight, would you like to work out the problem immediately? What is your impression of Japanese?
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.
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
Finding a pair of elements from two sorted lists for which the sum of the elements is a certain value
Enumerate the following from 1 to 4, being 1 the fastest to execute and 4 the slowest: - read cpu register - disk seek - context switch - read from main memory
reverse a linked list in linear time, with constrained memory, no second container allowed.
Viewing 911 - 920 interview questions