Showing 8 of 8 from page 1

## Checking subset sum | Facebook Interview Question & Solution

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,

## Non-decreasing Array | Facebook Interview Question & Solution

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

## Get number using bit math operations | Facebook Interview Question & Solution

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

## [Solution] Matrix-num-paths | Facebook Interview Question

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

## [Solution] numbers-sum-to-k | Facebook Interview Question

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

## [Solution] Longest-Sequence-With-2-Numbers | Facebook Interview Question

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

## [Solution] Best-Multiply-In-Array | Facebook Interview Question

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 