## Minimize the sum of digits of A and B such that A + B = N

Given an integer N, the task is to find two positive integers A and B such that A + B = N and the sum… Read More »

- Split the given array into K sub-arrays such that maximum sum of all sub arrays is minimum
- Find maximum meetings in one room
- Largest substring with same Characters
- Find minimum changes required in an array for it to contain k distinct elements
- Maximum Length Chain of Pairs | Set-2
- Unbounded Fractional Knapsack
- Count of integers that divide all the elements of the given array
- Create a Sorted Array Using Binary Search
- Find minimum length sub-array which has given sub-sequence in it
- Count common elements in two arrays containing multiples of N and M
- Maximum String Partition
- Minimum deletions required to make GCD of the array equal to 1
- Minimum operations required to make every element greater than or equal to K
- Number of balanced parenthesis substrings
- Find the Kth smallest element in the sorted generated array
- Minimum deletions required such that any number X will occur exactly X times
- Longest Subarray having strictly positive XOR
- Fractional Knapsack Queries
- Count ways to divide circle using N non-intersecting chord | Set-2
- Find if a binary matrix exists with given row and column sums
- Minimum deletions required to make frequency of each letter unique
- Lexicographically smallest string of length N and sum K
- Minimum increment operations to make K elements equal
- Find Nth smallest number that is divisible by 100 exactly K times
- Queries for number of distinct elements from a given index till last index in an array
- Check if string can be rearranged so that every Odd length Substring is Palindrome
- Order of indices which is lexicographically smallest and sum of elements is <= X
- Find optimal weights which can be used to weigh all the weights in the range [1, X]
- Count total number of even sum sequences
- Minimum cost to convert str1 to str2 with the given operations

Given an integer N, the task is to find two positive integers A and B such that A + B = N and the sum… Read More »

Prerequisite – Least Recently Used (LRU) Page Replacement algorithm Least Recently Used page replacement algorithm replaces the page which is not used recently. Implementation: In… Read More »

Given an array arr[] of size N which represents the initial number on each card and given a two dimensional array B[][] of size M… Read More »

A sequence of positive real numbers S1, S2, S3, …, SN is called a superincreasing sequence if every element of the sequence is greater than… Read More »

Given an undirected graph with N vertices and N edges. No two edges connect the same pair of vertices. A triangle is a set of… Read More »

Given two integer A and B, the task is to check whether the binary representation of B can be generated by permuting the binary digits… Read More »

Given an array arr[] of size N and an integer K > 0. The task is to find the number of subarrays with sum at… Read More »

Given an array arr[] of N elements where each arr[i] is the cumulative sum of the subarray P[0…i] of another array P[] where P is… Read More »

Given two integers N and K, the task is to find the count of set bits in the Kth number in the Odd-Even sequence made… Read More »

Given a string str, the task is to find the maximum valued alphabet in str. The value of a particular alphabet is defined as the… Read More »

Given an array arr[] of N distinct elements and an index range [L, R]. The task is to find whether a crest is present in… Read More »

Given a sequence arr of N positive integers, the task is to find the length of the longest subsequence such that xor of adjacent integers… Read More »

Given an integer array arr1 and a binary array arr2 of same size, the task is to find the maximum possible sum of products of… Read More »

Given an array arr[] of N integers and two players A and B are playing a game where the players pick the element with the… Read More »

Given two numbers X and Y of the same length, the task is to find the minimum number d that needs to be added to… Read More »