Given a Stack with n elements, write a method that always keeps the max of the stack?
Software Development Interview Questions
37,027 software development interview questions shared by candidates
Reverse a linked list
Started with 8-10 behavioural questions followed by a technical question. Technical question was to find the max sum of a subarray of a given array (Kadane's Algorithm)
You have one balance tab and 9 marbles. One of the marbles is heavier that the other 8 (which have the same weight). Having only two chances to use the balance tab, find the heaviest one.
Design an algorithm that calculates the width of a container based on the widest button nested inside the nth container.
Given an array of positive integers, sort the array in a manner such that when all the elements of new array are concatenated in a string, the number formed is maximum. e.g. input: [12,9,32] output: [9,32,12]
Given a string S and two indexes i & j, modify the string in a pattern such that: characters from [0 to i] index are now at back of the string. characters from [j till end of string] are in front of string. e.g. S = “abcdef” and i=1, j=3. Output should be: “defcab” Constraint: Constant Space.
coding on white table (data structures), solution architecture related questions
Solve the skyline problem on a whiteboard
1. reverse a sentence 2. a variation of sorting of k-sorted arrays. 3. prefix trees, search, ranking. 4. puzzle...on probability. there is a village where couples keep having boys until they have a girl child. I was asked to find boys : girls children ration in that village. 5. In a windowing system, given window size of m * n pixels and a set of different size rectangles...how to find shortest area rectangle for a mouse click. (it's algorithmic + design problem) Design round ----------------- 1. there is a company who has everything in OS X. They have a file server. Microsoft wants to offer them Windows NT servers for this. How can microsoft do the needful without affecting users. - Before jumping to solution, I would suggest to ask as many questions to understand what actually needed to do. The problem looks like microsoft has to implement the back-end server but exact amount of work depends on existing tech choices + design. We should be able to reuse a lot of existing implementation. 2. Cortana wants to display reminders for users. The overall architecture. -Ask as many questions as you can and understand the problem.
Viewing 3411 - 3420 interview questions