Given an array arr[] of size N, the task is to minimize the length of the given array by repeatedly removing subarrays from the start… Read More
Tag Archives: two-pointer-algorithm
Given a circular array arr[] of size N and an index K, the task is to reverse all elements of the circular array starting from… Read More
Given an array arr[] of size N and an integer K, the task is to find the minimum count of pairs required to be removed… Read More
Given an array arr[] of size N and an integer K, the task is to count the number of subarrays which consists of first K… Read More
Given an array arr[] of length N consisting of positive integers, the task is to find the longest increasing subsequence that can be formed by… Read More
Given an array arr[] consisting of N integers and an integer K, the task is to find the maximum number of pairs having a sum… Read More
Given two strings X and Y of length N, the task is to check if both the strings can be made equal by reversing any… Read More
Given two strings a and b of the same length, the task is to check if splitting both the strings and concatenating their opposite substrings,… Read More
Given an array arr[] consisting of N positive integers and an integer K, the task is to minimize the difference between the maximum and minimum… Read More
Given an array arr[] of N integers and two integers S and M, the task is to maximize the minimum array element by incrementing any… Read More
Given an array arr[] of size N, the task is to rearrange the array elements such that the count of local minima in the array… Read More
Given two integer arrays arr[] and brr[] consisting of distinct elements of size N and M respectively and an integer K, the task is to… Read More
Given two integer arrays arr[] and brr[] consisting of distinct elements of size N and M respectively and an integer K, the task is to… Read More
Given an array arr[] of length N, the task is to find the length of the longest subarray which consists of consecutive numbers in increasing… Read More
Given an array arr[] of N positive integers with an equal number of even and odd elements. The task is to use in-place swapping to… Read More
Courses