## Pick maximum sum M elements such that contiguous repetitions do not exceed K

Given an array arr[] of distinct elements and two integers M and K, the task is to generate an array from the given array elements… Read More »

- Count common characters in two strings
- Sort an array without changing position of negative numbers
- Nth number whose sum of digit is multiple of 10
- Given two arrays count all pairs whose sum is an odd number
- Find maximum xor of k elements in an array
- Find minimum difference between any two elements | Set 2
- Why Should I Learn Coding?
- Interactive Problems in Competitive Programming
- Check whether two strings contain same characters in same order
- Total number of possible Binary Search Trees using Catalan Number
- Program to find the kth character after decrypting a string
- Find the minimum number of operations required to make all array elements equal
- Maximize the happiness of the groups on the Trip
- Spanning Tree With Maximum Degree (Using Kruskal's Algorithm)
- Find the number of pair of Ideal nodes in a given tree
- Find the minimum number of elements that should be removed to make an array good
- Sum of digits with even number of 1's in their binary representation
- Find sub-arrays from given two arrays such that they have equal sum
- Count of all possible values of X such that A % X = B
- Equal Sum and XOR of three Numbers
- Lexicographically Smallest Topological Ordering
- Lazy Propagation in Segment Tree | Set 2
- Convert the undirected graph into directed graph such that there is no path of length greater than 1
- Check which player visits more number of Nodes
- Find the Nth Mosaic number
- Replace array elements by sum of next two consecutive elements
- Number of ways of scoring R runs in B balls with at most W wickets
- Optimally accommodate 0s and 1s from a Binary String into K buckets
- Count of integers in a range which have even number of odd digits and odd number of even digits
- Find the weight of the minimum spanning tree

Given an array arr[] of distinct elements and two integers M and K, the task is to generate an array from the given array elements… Read More »

Given two integers X and Y where X denotes the number of points required to qualify and Y denotes the number of matches left. The… Read More »

Given four integers a, b, c, d and two strings S1 and S2 of equal length, which consist only of the characters ‘2’, ‘1’ and… Read More »

Given a graph with N nodes and M edges. The task is to find the number of ways to select a node from each connected… Read More »

Given C magnets and an array arr[] representing N index positions where C ≤ N. The task is to place these magnets at these available… Read More »

Given an array arr[] consisting of N positive integers, and some queries consisting of a range [L, R], the task is to find whether the… Read More »

Given n 2-D points points[], the task is to find the perimeter of the convex hull for the set of points. A convex hull for… Read More »

Given an array arr[] of integers and an array q[] of queries. For the ith query, index = q[i][0] and value = q[i][1]. The task… Read More »

Given a 2-D matrix mat[][] the task is count the number of connected components in the matrix. A connected component is formed by all equal… Read More »

Given a range [L, R]. The task is to count the numbers in the range having difference between the sum of digits at even position… Read More »

Given a NxN matrix, the task is to find the sum of bit-wise AND of all of its rectangular sub-matrices. Examples: Input : arr[][] =… Read More »

Given two positive integers B and N. The task is to find the number of trailing zeroes in b-ary (base B) representation of N! (factorial… Read More »

Given an integer x and an array arr[] each element of which is a power of 2. The task is to find the minimum number… Read More »

Given a grid N x M size and initial position (X, Y) and a series of K moves. Each move contains 2 integers Dx and… Read More »

Given a set of points, the task is to find the covex hull of the given points. The convex hull is the smallest convex polygon… Read More »