Given an array arr[] consisting of N positive integers, the task is to find the last positive array element remaining after repeated subtractions of the… Read More

# Category Archives: Algorithms

Given an array arr[] of N integers, the task is to find the number of subsequences of the given array such that their Bitwise AND… Read More

A person wants to transfer bananas over to a destination A km away. He initially has B bananas and a camel. The camel cannot carry… Read More

Given a binary string S of size N and an integer K, the task is to find the minimum number of operations required to make… Read More

Given two arrays A[] and B[] consisting of N integers where A[i] represents the initial position of the ith plane and B[i] is the speed… Read More

Given a positive integer N, the task is to find the maximum number of unique squares that can be formed with N arbitrary points in… Read More

Given a string S consisting of N lowercase alphabets, the task is to modify the given string by replacing all the characters with characters other… Read More

Given an array arr[] consisting of N positive integers, the task is to find the number of subsequences from the given array whose Bitwise OR… Read More

Given an undirected graph consisting of N valued over the range [1, N] such that vertices (i, i + 1) are connected and an array… Read More

Given a sorted array arr[] consisting of N positive integers, the task is to rearrange the array such that all the odd indices elements come… Read More

Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and… Read More

Given two integers N and K, the task is to find the total number of possible binary array of size N such that the sum… Read More

Given an array arr[] consisting of heights of N chocolate bars, the task is to find the maximum height at which the horizontal cut is… Read More