Skip to content

Tag Archives: two-pointer-algorithm

Given numeric string str, the task is to find the minimum operations needed to make the string palindrome. An operation is defined as:  Select one… Read More
Given an array of distinct elements. The task is to find triplets in the array whose sum is zero. Examples :  Input : arr[] =… Read More
Given an array of distinct elements. The task is to find triplets in the array whose sum is zero. Examples :  Input : arr[] =… Read More
Given an array of distinct elements. The task is to find triplets in the array whose sum is zero. Examples :  Input : arr[] =… Read More
Given an array of distinct elements. The task is to find triplets in the array whose sum is zero. Examples :  Input : arr[] =… Read More
Given an array arr[] of length N, the task is to find the minimum product of subarray of size K of an array including negative… Read More
Given an array arr[], the task is to print the array formed by traversing given array from first to the last index by flipping the… Read More
Given an array and a value, find if there is a triplet in array whose sum is equal to the given value. If there is… Read More
Given an array and a value, find if there is a triplet in array whose sum is equal to the given value. If there is… Read More
Given an array and a value, find if there is a triplet in array whose sum is equal to the given value. If there is… Read More
Given an array and a value, find if there is a triplet in array whose sum is equal to the given value. If there is… Read More
Given an array arr[] of length N, the task is to find the maximum difference of integers in a subarray of size K. Input: arr… Read More
Given a binary string S of size N and an integer K, the task is to find the maximum length of consecutive 1s or 0s… Read More
Given an array arr[] consisting of N integers, the task is to find the minimum number of array elements that must be changed to any… Read More