You have a chest of 8 drawers. With probability 1/2, you put a letter in one of the drawers. With probability 1/2, you don't put a letter in any drawer. I open the first 7 drawers, all are empty. What is the probability there is a letter in the 8th drawer?
Software Engineer Entry Interview Questions
664,915 software engineer entry interview questions shared by candidates
Given a coin with probability x (= U[0, 1] showing head at each flip, what is the probability that you got a second head after getting the first one.
Find the integer pairs in an integer array, so that they sum up to a specific number n.
Design a vector that can grow with the size with time complexity of O(1)
Given a list of strings, write a function to calculate the longest common prefix (LCP) of all those strings.
Given a binary tree, write a function to find the length of the longest path in the tree.
Write a function that computes log2() using sqrt().
Create a linked list with 3 char (A,B,C) in it and print the list in reverse.
Take in an Int array and move all the zeroes to the end in place. It doesn’t matter how the non-zero numbers are ordered. Preferably as efficient and as space efficient as possible. Example: Input : [ 3, 0, 2, 0, 0, 4, 1, 0 ] Accepted Output: [ 4, 2, 3, 1, 0, 0, 0, 0 ]
Write a C function to return the number of set bits in an integer.
Viewing 281 - 290 interview questions