Skip to content

Tag Archives: two-pointer-algorithm

Given an array A[] of integers whose length is N, (where N is even) the task is to check if A[] can be grouped into… Read More
Given an array A[] of length N, the task is to find the minimum integer to be appended at any end in the array to… Read More
Given an array arr[] having N integers, the task is to find the maximum distance between any two occurrences of even integers. Examples: Input: arr[]… Read More
Given an array arr (1-based indexing) of length N and an integer X, the task is to find and print all index ranges having a… Read More
Given a binary string  str, the task is to determine if string str can be converted into a palindrome in K moves. In one move… Read More
Given three binary strings a, b, and c each having 2*N characters each, the task is to find a string having almost 3*N characters such… Read More
Given a String ph[], the task is to find the absolute difference of consecutive elements and insert the result in between the consecutive elements. By… Read More
Given an array arr[ ] of size N, the task is to find the rank of the remaining element in an array after performing the… Read More
Given N and M number of points on the straight line, denoting the positions of the customers and vendors respectively. Each vendor provides service to… Read More
Given an array arr[] of size N and an integer P (P < N), the task is to find the original array from the array… Read More
Given two sorted arrays of distinct elements, we need to print those elements from both arrays that are not common. The output should be printed… Read More
Given two sorted arrays of distinct elements, we need to print those elements from both arrays that are not common. The output should be printed… Read More
Given two sorted arrays of distinct elements, we need to print those elements from both arrays that are not common. The output should be printed… Read More
Given two sorted arrays of distinct elements, we need to print those elements from both arrays that are not common. The output should be printed… Read More
Given two sorted arrays of distinct elements, we need to print those elements from both arrays that are not common. The output should be printed… Read More

Start Your Coding Journey Now!