##
Exact Cover Problem and Algorithm X | Set 1
July 12, 2017

If you have ever tried to create a program for solving Sudoku, you might have come across the Exact Cover problem. In this article, we… Read More »

July 12, 2017

If you have ever tried to create a program for solving Sudoku, you might have come across the Exact Cover problem. In this article, we… Read More »

Master theorem is used to determine the Big – O upper bound on functions which possess recurrence, i.e which can be broken into sub problems.… Read More »

Given a Linked List, write a function that accepts the head node of the linked list as a parameter and returns the value of node… Read More »

Given a number n. We need find the number of ordered pairs of a and b such gcd(a, b) is b itself Examples: Input :… Read More »

July 11, 2017

Given an integer n, find the last digit of this sequence, i.e. Summation of F(n) from i = 0 to 2i ≤ n, where F(n)… Read More »

Given a singly linked list containing n nodes. The problem is to sort the list using recursive selection sort technique. The approach should be such… Read More »

Here is a C++ code that illustrates that sorting the data miraculously makes the code faster than the unsorted version. Let’s try out a sample… Read More »

Sort the given biotonic doubly linked list. A biotonic doubly linked list is a doubly linked list which is first increasing and then decreasing. A… Read More »

Given center of the sphere and its radius. your task is to store efficiently all the integer points required to show a sphere on the… Read More »

Given an array of natural numbers count the sum of its proper divisors for every element in array. Input : int arr[] = {8, 13,… Read More »

July 10, 2017

Given two non-negative numbers n and m. The problem is to find the largest number having n number of set bits and m number of… Read More »

Given a number n, write a program to check whether given number is Adam Number or not. Adam number is a number when reversed, the… Read More »

Given a number ‘n’ and a prime number ‘p’. We need to find out the power of ‘p’ in prime factorization of n! Examples: Input… Read More »

July 9, 2017

Parity of a number refers to whether it contains an odd or even number of 1-bits. The number has “odd parity”, if it contains odd… Read More »

Given two string X and Y. The task is to find the length of longest subsequence of string X which is substring in sequence Y.… Read More »