## N-bonacci Numbers

You are given two Integers N and M, and print all the terms of the series upto M-terms of the N-bonacci Numbers. For example, when… Read More »

- Count Occurences of Anagrams
- Subarray of size k with given sum
- Number of sub-strings which are anagram of any sub-string of another string
- Number of subarrays having sum in a given range
- Subarray whose absolute sum is closest to K
- Maximum sum and product of the M consecutive digits in a number
- Majority element in a circular array of 0's and 1's
- Maximum number of Unique integers in Sub-Array of given size
- Lexicographically smallest and largest substring of size k
- Sub-strings of length K containing same character
- Print Minimum of all Subarrays using set in C++ STL
- Find number of substrings of length k whose sum of ASCII value of characters is divisible by k
- Maximum of all Subarrays of size k using set in C++ STL
- Number of sub-arrays that have at least one duplicate

You are given two Integers N and M, and print all the terms of the series upto M-terms of the N-bonacci Numbers. For example, when… Read More »

Given an array of N non-negative integers, task is to find the maximum size of a subarray such that the pairwise sum of the elements… Read More »

Given an array of numbers and a number k, find the number of subarrays having sum less than k. We may assume that there is… Read More »

Given an array of positive numbers and a number k, find the number of subarrays having product exactly equal to k. We may assume that… Read More »

Given an array of 0’s and 1’s, we need to write a program to find the minimum number of swaps required to group all 1’s… Read More »

Given a large number as string s and an integer k which denotes the number of breakpoints we must put in the number k <=… Read More »

Given an array of size n. The problem is to find the longest sub-array having exactly k odd numbers. Examples: Input : arr[] = {2,… Read More »

You are given an array of n-elements and an odd-integer m. You have to construct a new sum_array from given array such that sum_array[i] =… Read More »

You are given an array of n-elements you have to find the mean of the array as mean of all consecutive m-elements of array for… Read More »

Given an array of N elements and L and R, print the number of sub-arrays such that the value of the maximum array element in… Read More »

Given an array of integers and k, find the difference between the number of the strictly increasing number of subarrays (of size more than one)… Read More »

Given an array and an integer K. We need to find the maximum of every segment of length K which has no duplicates in that… Read More »

Given N elements and a number K, find the longest subarray which has not more then K distinct elements.(It can have less then K) Examples:… Read More »

We are given an array a consisting of n integers and an integer k. We need to find minimum range in array [l, r] (both… Read More »

Given an array of n integers, for each element, print the distance to the closest zero. Array has a minimum of 1 zero in it.… Read More »