Given array of stick lengths, return number of turns it takes to have no sticks left. Each turn you remove sticks of smallest length and cut that length from the rest of the sticks.
Softwareentwickler Softwareentwickler Interview Questions
512,282 softwareentwickler softwareentwickler interview questions shared by candidates
Puzzle1 - Given 8 coins, and the fact that one of the coins is heavier than the other, how many times(min) do you need to use a beam balance to figure out which is the anomalous coin? After I answered this, he made it little tougher. Given 9 coins and one anomalous coin(maybe heavier or lighter), figure out which coin it is and whether heavier or lighter. What is the min no of comparisons? This is where i took a while to answer.
Jim has 42 cents and has 8 coins, and Jack has 56 cents and has 6 coins. Which has more nickels than the other?
Find the median of unsorted array in O(nlog n ) time. You need to know that particular mathematical algorithm, anything slower your answer is rejected.
(Phone screen questions) 1. For a given binary tree, print paths from root to all leaf nodes, one path per line. 2. Given a sequence of positive integers "seq" and an integer "total", return whether a contiguous sequence of "seq" sums up to "total". (Onsite interview questions are covered by NDA therefore can't post, but it can be said that the knowledge of data structures and handling edge cases are important for the coding interviews)
Given a collection of words, return a collection of anagrams found in the given collection
You are given a set of numbers 0 - n. Given a k, print all subsets of size k. Give the time complexity of the algorithm.
calculate x^1/2
Implement a method called printNonComments() which prints out a extract of text with comments removed. For example, the input: hello /* this is a multi line comment */ all Should produce: hello all You have access to a method called getNextLine() which returns the next line in the input string.
I said suffix tree is the best way to go, so he asked me how will a node of that tree will look like?
Viewing 781 - 790 interview questions