Skip to content

Tag Archives: prefix

Given an array arr[] of size N, the task is to count the number of subarrays from the given array having odd Bitwise XOR value.… Read More
Given two strings str1 and str2 of the lengths of N and M respectively, the task is to find the length of the longest anagram… Read More
Given an array arr[] consisting of N integers and an array Q[][] consisting of queries of the form [L, R]., the task for each query… Read More
Given an array arr[] and an array Q[][] consisting of queries of the form of {L, R}, the task for each query is to find… Read More
Given two arrays A[] and B[] of size N, the task is to find the minimum count of operations required to make A[i] multiples of… Read More
Given an array arr[] of size N, the task is to find the number of prefix arrays whose maximum is less than the maximum element… Read More
Prerequisites: Z-algorithm Given a string S, the task is to find the maximum number of palindromes that can be formed after performing the given steps:… Read More
Given two arrays arr1[] of size M and arr2[] of size N, the task is to find the sum of bitwise AND of each element… Read More
Given two arrays arr1[] of size M and arr2[] of size N, the task is to find the sum of bitwise OR of each element… Read More
Given two strings S and T of length N and M respectively, the task is to check if the string S can be converted to… Read More
Given an array arr[] of size N and an integer K, the task is to find the length of the longest subarray having Bitwise XOR… Read More
Given a binary matrix mat[][] of size M * N and Q queries of the form {pi, pj, qi, qj}, the task for each query… Read More
Given an array arr[] consisting of N integers, the task is to count ways to split array into two subarrays of equal sum by changing… Read More
Given an array, arr[] of size N, the task is to count the number of ways to split given array elements into two subarrays such… Read More
Given a string str, consisting of lowercase alphabets, the task is to find the shortest string which is not a subsequence of the given string.… Read More

Start Your Coding Journey Now!