software developer interview questions shared by candidates
They asked a lot of iOS questions, and some general programming questions. The first question they asked was so obscure that I didn't even really understand it. I was probably dead from that point on. Another question was to figure out a way to combine three lists of items where an item would be placed in a destination array if it existed in any two of the source arrays.
For that, I first came up with a triple loop, but finally came over to using a hash table instead.
I solved it using 2 for loops with time complexity O(n^2). Combine all three lists and check if each item exist 2 times then add to destination array otherwise ignore
@Kiran: You can't combine those three lists as they are not set so the items inside each of one of them could be repeated. For instance if you have few duplicated items in first list and combine them all, you would assume just because they are repeated they should be consider as the result. The rock solid is to compare list a to list b and have the result in a set and then a with c and b with c. The reason I keep the result in a set is to not have duplicate in the result as well. (Question didn't mention anything about this part so just a suggestion) Now you can work on hash table or other data structure to have a better time complexity as the question doesn't say anything about it.
-given a binary tree, and a number in each node. Select the nodes that will maximize the overall sum such that if a node is selected its parent and children cannot be selected. Return the sum of the selected nodes. - The buildings in a a city can be represented in 2D by linear array. Given an array that represents the heights of the buildings such that the value in a specific index in the array indicates the height of the building at that location in the city. How much rain will gather in the city if it rains?
See Interview Questions for Similar Jobs
- Software Engineer
- Senior Software Engineer
- Software Developer
- Android Developer
- Software Development Engineer
- Java Developer
- Applications Developer
- Software Development Engineer II
- Senior Consultant
- Software Development Engineer I
- Business Analyst
- Test Engineer
- Technical Lead