Skip to content

Tag Archives: Facebook

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 anti-clockwise direction without using any extra space.Examples :   Input: Matrix: 1 2 3 4 5… 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 to… 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 below integers: 1, 11, 21, 1211, 111221, 312211,… 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 sum… 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
Consider a coding system for alphabets to integers where ‘a’ is represented as 1, ‘b’ as 2, .. ‘z’ as 26. Given an array of… Read More

Start Your Coding Journey Now!