Given two unsorted arrays of distinct elements, the task is to find all pairs from both arrays whose sum is equal to X. Examples: Inputโฆ Read More
Tag Archives: Facebook
Given an array of distinct elements. The task is to find triplets in the array whose sum is zero. Examples : Input: arr[] = {0,โฆ Read More
Given a dictionary, a method to do a lookup in the dictionary and a M x N board where every cell has one character. Findโฆ Read More
Given a number, find its corresponding Roman numeral. Examples: Input : 9 Output : IX Input : 40 Output : XL Input : 1904 Outputโฆ Read More
Given a string, find out if the string is K-Palindrome or not. A K-palindrome string transforms into a palindrome on removing at most k charactersโฆ Read More
Given a Roman numeral, the task is to find its corresponding decimal value. Example : Input: IX Output: 9 IX is a Roman symbol whichโฆ Read More
Given a square matrix, turn it by 90 degrees in an anti-clockwise direction without using any extra space Examples: Input:Matrix: 1 2 3 โฆ Read More
Given a binary tree, find its minimum depth. The minimum depth is the number of nodes along the shortest path from the root node downโฆ Read More
Given two binary strings, return their sum (also a binary string). Example: Input: a = "11", b = "1" Output: "100" We strongly recommend youโฆ Read More
Find the n’th term in Look-and-say (Or Count and Say) Sequence. The look-and-say sequence is the sequence of the below integers: 1, 11, 21, 1211, 111221,โฆ Read More
Even if we were to search around the world, it would be a truly difficult job to find someone like Deepali. As a Computer Scienceโฆ Read More
Recently facebook visited our campus. There was an online round first. 7 people were shortlisted for the telephonic interviews. And then there were 2 telephonicโฆ Read More
Let 1 represent ‘A’, 2 represents ‘B’, etc. Given a digit sequence, count the number of possible decodings of the given digit sequence. Examples: Input:โฆ Read More
Given a binary tree in which each node element contains a number. Find the maximum possible sum from one leaf node to another. The maximumโฆ Read More