# Tag Archives: two-pointer-algorithm

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
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