Facebook is an American online social media and social networking service based in Menlo Park, California. The Facebook website was launched on February 4, 2004, by Mark Zuckerberg, along with fellow Harvard College students and roommates, Eduardo Saverin, Andrew McCollum, Dustin Moskovitz, and Chris Hughes.

Learn more..

Minimum Word Break

Given a string s, break s such that every partition can be found in the dictionary. Return the minimum number of breaks needed. Example: Given a dictionary ["Cat", "Mat", "Ca", "tM", "at", "C", "D ...
Berkan Teber
Published on Jan 16th, 2018

Maximum Flips in a Binary String to Make All 1’s in Left and All 0’s in Right

Given a binary string, we can flip all 1s and 0s . Calculate the minimum flips required to make all 1s in left and all 0s in right. There should be at least one 0 and one 1. Examples: "1011000" can ...
Berkan Teber
Published on Jan 16th, 2018

Find All Possible Interpretations

Consider a coding system for alphabets to integers where ‘a’, ‘b’, ..., ‘z’ are represented as 1, 2, ..., 26. Given a string of digits 1..9 as input, write a function that prints all valid interpre ...
Berkan Teber
Published on Jan 16th, 2018

Largest Sum Subarray with At Least k Numbers

Given an array, find the subarray (containing at least k numbers) which has the largest sum. Return the sum. Examples: [-4, -2, 1, -3] and k = 2 should return -1. The subarray is [-2, 1]. [1, 1, 1 ...
Berkan Teber
Published on Jan 16th, 2018

Decode String Recursively

An encoded string is given. The pattern in which the strings are encoded is as follows: [substr] means that the substring 'substr' appears count times. The task is to decode the given string. Exampl ...
Berkan Teber
Published on Jan 16th, 2018

Find the Maximum Value by Inserting ‘+’, ’*’ and '()'

Given an array of numbers, the task is to find the maximum value from the string, you can add a ‘+’ or ‘*’ sign between any two numbers. You should also use parantheses. Examples: [0, 1, 2, 3, 1] c ...
Berkan Teber
Published on Jan 16th, 2018