##
Recaman’s sequence
April 3, 2017

Given an integer n. Print first n elements of Recaman’s sequence. Examples: Input : n = 6 Output : 0, 1, 3, 6, 2, 7… Read More »

April 3, 2017

Given an integer n. Print first n elements of Recaman’s sequence. Examples: Input : n = 6 Output : 0, 1, 3, 6, 2, 7… Read More »

March 23, 2017

Given two numbers x and n, find number of ways x can be expressed as sum of n-th power of unique natural numbers. Examples: Input… Read More »

March 11, 2017

Insertion sort is a simple sorting algorithm that works the way we sort playing cards in our hands.

February 15, 2017

Background : Bubble Sort is the simplest sorting algorithm that works by repeatedly swapping the adjacent elements if they are in wrong order.

January 16, 2017

Given a integer K. Task is Print All binary string of size K (Given number). Examples: Input : K = 3 Output : 000 ,… Read More »

January 15, 2017

Given a positive integer n, the task is to find whether this number reaches to 1 after performing following two operations:- If n is even,… Read More »

January 11, 2017

What is Recursion? The process in which a function calls itself directly or indirectly is called recursion and the corresponding function is called as recursive… Read More »

January 4, 2017

Given following three values, the task is to find the total number of maximum chocolates you can eat. money : Money you have to buy… Read More »

November 13, 2016

You are given two strings.Now you have to print all longest common sub-sequences in lexicographical order? Examples: Input : str1 = “abcabcaa”, str2 = “acbacba”… Read More »

October 15, 2016

Given a string, the task is to find whether it contains an additive sequence or not. A string contains an additive sequence if its digits… Read More »

October 13, 2016

Given an array of integers, print sums of all subsets in it. Output sums can be printed in any order. Input : arr[] = {2,… Read More »

October 12, 2016

Given a string that contains only digits from 0 to 9, and an integer value, target. Find out how many expressions are possible which evaluate… Read More »

August 2, 2016

Given a number n, find all binary sequences of length 2n such that sum of first n bits is same as sum of last n… Read More »

July 29, 2016

Given number of digits n in a number, print all n-digit numbers whose digits are strictly increasing from left to right. Examples: Input: n =… Read More »

November 20, 2015

Given in input that has relationships between a person and their children, for all the people in this data, identify grandparents of all the people… Read More »