## Select numbers in such way to maximize the amount of money

Given two arrays A1 and A2 of N numbers. There are two people A and B who select numbers out of N. If A selects… Read More »

- Dijkstra's shortest path with minimum edges
- CPU Scheduling | Longest Remaining Time First (LRTF) Program
- Minimum number of sets with numbers less than Y
- Minimum Increment / decrement to make array elements equal
- Minimum cost to reach a point N from 0 with two different operations allowed
- Remove exactly one element from the array such that max - min is minimum
- Check whether all the rotations of a given number is greater than or equal to the given number or not
- Check if it is possible to sort the array after rotating it
- Find length of longest Fibonacci like subsequence
- Maximum sum by picking elements from two arrays in order
- Minimize the maximum minimum difference after one removal from array
- Python Program to check if given array is Monotonic
- Rectangle with minimum possible difference between the length and the width
- Minimum number of operations required to reduce N to 1
- Maximum litres of water that can be bought with N Rupees
- Minimum elements to be removed such that sum of adjacent elements is always odd
- Find maximum distance between any city and station
- Maximum sum of all elements of array after performing given operations
- K-th lexicographically smallest unique substring of a given string
- Minimize the difference between minimum and maximum elements
- Minimum number of 1's to be replaced in a binary array
- Check if a string can be rearranged to form special palindrome
- Count all possible N digit numbers that satisfy the given condition
- Count subarrays with Prime sum
- Count valid pairs in the array satisfying given conditions
- Find Intersection of all Intervals
- Minimum number of bottles required to fill K glasses
- Minimum swaps required to make a binary string alternating
- Rearrange an array to maximize i*arr[i]
- Find the k smallest numbers after deleting given elements

Given two arrays A1 and A2 of N numbers. There are two people A and B who select numbers out of N. If A selects… Read More »

Given an array arr[], the task is to find the minimum number of elements that must be removed to make the array good. A sequence… Read More »

There are N distinct integers arranged on a circle. The distance between any two adjacent numbers is 1. The task is to travel on this… Read More »

Given an array of N integers. The task is to eliminate the minimum number of elements such that in the resulting array the sum of… Read More »

Given an integer N, the task is to count all possible N digit numbers such that A + reverse(A) = 10N – 1 where A… Read More »

Given an array arr[] and an integer k, we can cut this array at k different positions where k[] stores the positions of all the… Read More »

Given N intervals of the form of [l, r], the task is to find the intersection of all the intervals. An intersection is an interval… Read More »

Given two segments [L1, R1] and [L2, R2], the task is to choose two elements x and y from both the ranges (one from range… Read More »

Given an array arr[] of integers. The task is to return the length of the maximum size sub-array such that either one of the condition… Read More »

Given a string str and an integer k. The task is to count the occurrences of sub-strings of length k that consist of the same… Read More »

Given two integers N and M which denote the number of persons of Type1 and Type2 respectively. The task is to find the maximum number… Read More »

Given an integer N. You can select any two digits from this number (the digits can be same but their positions should be different) and… Read More »

Given a string str of length n (n is a multiple of 3) containing characters only from the set {0, 1, 2}. The task is… Read More »

Given sides of four small squares. You have to find the side of the smallest square such that it can contain all given 4 squares… Read More »

Given an integer area, the task is to find the length and breadth of a rectangle with the given area such that the difference between… Read More »