Facebook latest placement papers of December are listed in Indiahires.in. Get your latest Facebook placement questions from Indiahires.
Q1. Given an increasingly sorted array and a number s, please find two numbers whose sum is s. If there are multiple pairs with sum s, just output any one of them.
Q2. Given an array, please determine whether it contains three numbers whose sum equals to 0.
Q3. Given an array and a value, how to implement a function to remove all instances of that value in place and return the new length? The order of elements can be changed. It doesn’t matter what you leave beyond the new length.
Q4. How to implement a function to check whether there is a path for a string in a matrix of characters? It moves to left, right, up and down in a matrix, and a cell for movement. The path can start from any entry in a matrix. If a cell is occupied by a character of a string on the path, it cannot be occupied by another character again.
A B C
E S F
C S A
D E E
Q5. Numbers are serialized increasingly into a sequence in the format of 0123456789101112131415…, in which each digit occupies a position in the sequence. For instance, the digit in position 5 is 5, in position 13 is 1, in position 19 is 4, and so on.
Q6. How can you implement two stacks in a single array, where no stack overflows until no space is left in the entire array space?
Q7. When some elements at the beginning of an array are moved to the end, it gets a rotation of the original array. Please implement a function to search a number in a rotation of an increasingly sorted array. Assume there are no duplicated numbers in the array.
Q8. There are n houses built in a line, each of which contains some value in it. A thief is going to steal the maximum value in these houses, but he cannot steal in two adjacent houses because the owner of a stolen house will tell his two neighbors on the left and right sides. What is the maximal stolen value?
Q9. A string can be partitioned into some substrings, such that each substring is a palindrome. For example, there are a few strategies to split the string “abbab†into palindrome substrings, such as: “abbaâ€|â€bâ€, “aâ€|â€bâ€|â€bab†and “aâ€|â€bbâ€|â€aâ€|â€bâ€.