##
Collect maximum points in an array with k moves
September 6, 2017

Given an array of integer and two value k and i where k is number of moves and i is index in array. Task is… Read More »

September 6, 2017

Given an array of integer and two value k and i where k is number of moves and i is index in array. Task is… Read More »

September 3, 2017

Given an array of integers, our goal is to find the length of largest subarray having sum of its elements atmost ‘k’ where k>0. Examples:… Read More »

August 30, 2017

Given a string of length N, find the length of the smallest sub-string consisting of maximum distinct characters. Note : Our output can have same… Read More »

August 5, 2017

Given an array of integers and a sum. We have to find sum of subarray having maximum sum less than or equal to given sum… Read More »

July 30, 2017

A string defining a valid number is given. Output all the base conversions of substrings of length ‘k’ from base ‘b’ to base 10. Examples:… Read More »

July 3, 2017

Given an array and a number k, the task is to calculate the sum of the product of all elements of subarrays of size k.… Read More »

June 21, 2017

Given an array of n integers. Count total number of sub-array having total distinct elements same as that of total distinct elements of original array.… Read More »

June 8, 2017

Given an array and a positive integer k, find the first negative integer for each and every window(contiguous subarray) of size k. If a window… Read More »

June 6, 2017

Given an array, find the subarray (containing at least k numbers) which has the largest sum. Examples: Input : arr[] = {-4, -2, 1, -3}… Read More »

May 23, 2017

Given a string, find the smallest window length with all distinct characters of the given string. For eg. str = “aabcbcdbca”, then the result would… Read More »

April 16, 2017

This technique shows how a nested for loop in few problems can be converted to single for loop and hence reducing the time complexity. Let’s… Read More »

March 15, 2017

Given an array of integers and a number k, find maximum sum of a subarray of size k. Examples : Input : arr[] = {100,… Read More »

January 4, 2017

Given an array of both positive and negative integers, the task is to compute sum of minimum and maximum elements of all sub-array of size… Read More »

September 10, 2015

Given an integer array of size n, find the maximum of the minimum’s of every window size in the array. Note that window size varies… Read More »

August 6, 2015

Given an array of size n and an integer k, return the of count of distinct numbers in all windows of size k.