## Maximum profit by selling N items at two markets

Given two array A[] and B[] each of length N where A[i] and B[i] are the prices of the ith item when sold in market… Read More »

## Find an array of size N that satisfies the given conditions

Given three integers N, S and K, the task is to create an array of N positive integers such that the bitwise OR of any… Read More »

## Arrange numbers to form a valid sequence

Given an array arr[] with N distinct numbers and another array arr1[] with N-1 operators (either < or >), the task is to organize the… Read More »

## Partitions possible such that the minimum element divides all the other elements of the partition

Given an integer array arr[], the task is to count the number of partitions possible such that in each partition the minimum element divides all… Read More »

## Make all the array elements odd with minimum operations of given type

Given an array arr[] consisting of even integers. At each move, you can select any even number X from the array and divide all the… Read More »

## Minimum number of swaps to make two binary string equal

Given two binary strings of equal length, the task is to find the minimum number of swaps to make them equal. Swapping between two characters… Read More »

## Maximize the number of palindromic Strings

Given N binary strings b1, b2, b3…. bn. The task is to find the maximum number of binary strings that you can make palindromic by… Read More »

## Minimum changes required to make all element in an array equal

Given an array of length N, the task is to find minimum operation required to make all elements in the array equal. Operation is as… Read More »

## Number of cells in matrix which are equidistant from given two points

Given a matrix of N rows and M columns, given two points on the matrix; the task is to count the number of cells that… Read More »

## Minimize the sum of differences of consecutive elements after removing exactly K elements

Given a sorted array of length ‘N’ and an integer ‘K'(K<N), the task is to remove exactly 'K' elements from the array such that sum… Read More »

## Minimum operations to make two numbers equal

Given two numbers n and m, the task is to find the minimum number of operations required to make them equal if the following operations… Read More »

## Maximize the number by flipping at most K bits

Given an integer N, the task is to find the greatest number that can be obtained by flipping at most K bits in the binary… Read More »

## Minimum possible travel cost among N cities

There are N cities situated on a straight road and each is separated by a distance of 1 unit. You have to reach the (N… Read More »

## Difference between Prim’s and Kruskal’s algorithm for MST

Kruskal’s algorithm for MST Given a connected and undirected graph, a spanning tree of that graph is a subgraph that is a tree and connects… Read More »

## Minimum cells to be flipped to get a 2*2 submatrix with equal elements

Given a matrix of size M * N, the task is to find the count of the minimum number of cells that must be flipped… Read More »