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?
Software Engineer 2 Interview Questions
665,594 software engineer 2 interview questions shared by candidates
Build a simple app that involves displaying data that changes in realtime
If I knew what the cross apply operator was
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 1031 - 1040 interview questions