One independent survey showed that 70% on people asked like coffee. Another independent survey showed that 80% of people like tea. What is the upper and lower bound of peoples who likes both coffee and tea
Software Engineer Interview Questions
664,753 software engineer interview questions shared by candidates
Given the daily values of a stock, find how you can lose the most with one buy-sell trading.
Quiz
Given an array of integers eg [1,2,-3,1] find whether there is a sub-sequence that sums to 0 and return it (eg 1,2,-3 or 2,-3,1) Checking every sub-sequence is O(n^2) which is too inefficient
Function to compute the number of ways to climb a flight of n steps. Taking 1, 2, or 3 steps at a time. Do it in Linear time and constant space. n = 3. 1 1 1 1 2 2 1 3 Ans = 4
Given an array, without using extra space, move all zeros to the end and no-zeros to the beginning. The function should return the number of non-zeros.
Just data structure and algorithms questions
Given a sorted matrix where the number below and right of you will always be bigger, write an algorithm to find if a particular number exist in the matrix. What is the running time of your algorithm.
You are trying to rob houses on a street. Each house has some +ve amount of cash. Your goal is to rob houses such that you maximize the total robbed amount. The constraint is once you rob a house you cannot rob a house adjascent to that house.
You have 17 red and 17 blue balls, and you remove 2 at a time. If the two are the same colour, add in one extra blue ball. If they are different colours, add in an extra red ball. What colour is the final ball removed?
Viewing 61 - 70 interview questions