The first few terms(Fn) of Fibonacci Numbers are 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, … For given N find the sum (Sn) of 0 Read more →
Sum
6 postsGiven N and M, distribute first N natural numbers in two sets such that the absolute sum of the numbers in the two sets is equal to M. If possible, print the Read more →
Given an array arr[] of N non-negative integers, the task is to sort these integers according to the sum of letters required to represent them. Examples: Input: arr[] = {12, 10, 31, Read more →
Given an array with n elements, task is to calculate the difference between the sum of those elements occurring at odd indexes and those at even indexes. Note : For the above Read more →
Given an array in increasing order and a target, return indices of two numbers such that they add up to the target. You have to return an array of indices where the Read more →
In this article, you will learn to calculate Sum of First n Natural numbers. The positive numbers 1, 2, 3… are known as natural numbers. The sum of natural numbers up to Read more →