## Find cubic root of a number

Given a number n, find the cube root of n. Examples: Input: n = 3 Output: Cubic Root is 1.442250 Input: n = 8 Output:… Read More »

## Find frequency of each element in a limited range array in less than O(n) time

Given an sorted array of positive integers, count number of occurrences for each element in the array. Assume all elements in the array are less… Read More »

## Longest Common Prefix using Divide and Conquer Algorithm

Given a set of strings, find the longest common prefix. Examples: Input : {“geeksforgeeks”, “geeks”, “geek”, “geezer”} Output : “gee” Input : {“apple”, “ape”, “april”}… Read More »

## Modular Exponentiation (Power in Modular Arithmetic)

Given three numbers x, y and p, compute (xy) % p. Examples : Input: x = 2, y = 3, p = 5 Output: 3… Read More »

## Square root of an integer

Given an integer x, find square root of it. If x is not a perfect square, then return floor(√x). Examples : Input: x = 4… Read More »

## Find the element that appears once in a sorted array

Given a sorted array in which all elements appear twice (one after one) and one element appears only once. Find that element in O(log n)… Read More »

## Flipkart Interview Experience | Set 26

1. Machine Coding: Two players, two field; and have multiple ships located in their fields. They are guessing each others ship position and hitting. Tell… Read More »

## Iterative Tower of Hanoi

Tower of Hanoi is a mathematical puzzle. It consists of three poles and a number of disks of different sizes which can slide onto any… Read More »

## The Skyline Problem using Divide and Conquer algorithm

Given n rectangular buildings in a 2-dimensional city, computes the skyline of these buildings, eliminating hidden lines. The main task is to view buildings from… Read More »

## Tiling Problem using Divide and Conquer algorithm

Given a n by n board where n is of form 2k where k >= 1 (Basically n is a power of 2 with minimum… Read More »

## Find the missing number in Arithmetic Progression

Given an array that represents elements of arithmetic progression in order. One element is missing in the progression, find the missing number. Examples: Input: arr[]… Read More »

## Multiply two polynomials

Given two polynomials represented by two arrays, write a function that multiplies given two polynomials. Example: Input: A[] = {5, 0, 10, 6} B[] =… Read More »

## Count all possible walks from a source to a destination with exactly k edges

Given a directed graph and two vertices ‘u’ and ‘v’ in it, count all possible walks from ‘u’ to ‘v’ with exactly k edges on… Read More »

## Program for Tower of Hanoi

Tower of Hanoi is a mathematical puzzle where we have three rods and n disks. The objective of the puzzle is to move the entire… Read More »

## Search in a Row-wise and Column-wise Sorted 2D Array using Divide and Conquer algorithm

Given an n x n matrix, where every row and column is sorted in increasing order. Given a key, how to decide whether this key… Read More »