This problem was asked by Facebook. Given a multiset of integers, return whether it can be partitioned into two subsets whose sums are the same. For example, given the multiset 15, 5, 20, 10, 35, 15,
This problem was asked by Facebook. Given an array of integers, write a function to determine whether the array could become non decreasing by modifying at most 1 element. For example, given the array
This problem was asked by Facebook. Given three 32 bit integers x, y, and b, return x if b is 1 and y if b is 0, using only mathematical or bit operations. You can assume b can only be 1 or 0. Idea be
This problem was asked by Facebook. There is an N by M matrix of zeroes. Given N and M, write a function to count the number of ways of starting at the top left corner and getting to the bottom right
This problem was recently asked by Facebook You are given a list of numbers, and a target number k. Return whether or not there are two numbers in the list that add up to k. Example Given 4, 7, 1 , 3
This problem was recently asked by Facebook Given a sequence of numbers, find the longest sequence that contains only 2 unique numbers. Example Input 1, 3, 5, 3, 1, 3, 1, 5 Output 4 The longest se
This problem was asked by Facebook. Given a list of integers, return the largest product that can be made by multiplying any three integers. For example, if the list is 10, 10, 5, 2 , we should retur
This problem was asked by Facebook. Given a array of numbers representing the stock prices of a company in chronological order, write a function that calculates the maximum profit you could have made
Recent comments on facebook
No comments found