Skip to content

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[] =… 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 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 anti-clockwise direction without using any extra space. Examples :  Input: Matrix: 1 2 3 4… 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
Given an array of integers and a number x, find the smallest subarray with sum greater than the given value.  Examples: arr[] = {1, 4,… Read More
Given an integer array and a positive integer k, count all distinct pairs with differences equal to k.  Examples:  Input: arr[] = {1, 5, 3,… Read More

Start Your Coding Journey Now!