## Minimize the cost to split a number

Given an integer N ≥ 2, you can split the number as a sum of k integers i.e. N = k1 + k2 + …… 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
- Check if a Queen can attack a given cell on chessboard
- Find the minimum number of operations required to make all array elements equal
- Maximize the happiness of the groups on the Trip
- Find the minimum number of elements that should be removed to make an array good
- Find the number of pair of Ideal nodes in a given tree
- Spanning Tree With Maximum Degree (Using Kruskal's Algorithm)
- Find sub-arrays from given two arrays such that they have equal sum
- Maximum subarray sum by flipping signs of at most K array elements
- Count of all possible values of X such that A % X = B
- Count how many times the given digital clock shows identical digits
- Equal Sum and XOR of three Numbers
- Lazy Propagation in Segment Tree | Set 2
- Number of ways of scoring R runs in B balls with at most W wickets
- Convert the undirected graph into directed graph such that there is no path of length greater than 1
- Sum of digits with even number of 1's in their binary representation
- Find the Nth Mosaic number
- Lexicographically Smallest Topological Ordering
- Optimally accommodate 0s and 1s from a Binary String into K buckets
- Replace array elements by sum of next two consecutive elements

Given an integer N ≥ 2, you can split the number as a sum of k integers i.e. N = k1 + k2 + …… Read More »

Given a connected undirected weighted graph with N nodes and M edges. The task is to perform given queries and find the weight of the… Read More »

Given a string str consisting of characters and numbers and an integer k, the task is to decrypt the string and the return the kth… Read More »

Given a range [l, r], the task is to find the sum fib(l) + fib(l + 1) + fib(l + 2) + ….. + fib(r)… Read More »

Given an array of positive and negative elements. The task is to replace every i-th element of the array by the absolute difference of absolute… Read More »

Given three integers R, B and W which denote the number of runs, balls and wickets. One can score 0, 1, 2, 3, 6 or… Read More »

Given an array arr[] of N unique elements and Q queries. Every query consists of two integers L and R. The task is to print… Read More »

Given an integer N. The following tasks are performed: The number is noted. The leading digit from N is subtracted from N and the resulting… Read More »

Given two integers A and B, the task is to calculate 22A % B. Examples: Input: A = 3, B = 5 Output: 1 223… Read More »

Given an array arr[] of size N and an integer K, the task is to find the smallest index in the array such that: floor(arr[i]… Read More »

Given three integers X, N and M. The task is to find XXX…(N times) % M where X can be any digitfrom the range [1,… Read More »

Given an integer Y, find the smallest number X such that X! contains at least Y trailing zeros. Prerequisites – Count trailing zeroes in factorial… Read More »

Given a number N. Find the number of ways to divide a number into four parts(a, b, c, d) such that a = c and… Read More »

Given a range of positive integers from l to r. Find such a pair of integers (x, y) that l <= x, y <= r,… Read More »

Given 2 integers L and R, the task is to find out the number of integers in the range [L, R] such that they are… Read More »