Skip to content

Tag Archives: prefix

Given arrays Arr[] and Queries[] of size N and an integer K such that (0 ≤ Arr[i], Queries[i] < 2K), the task is to form… Read More
You are given two integers N and M (M ≤ N), the task is to create an array of length N following the below-given conditions.… Read More
Given two arrays of strings containing words[] and queries[] having N and Q strings respectively, the task is to find the number of strings from… Read More
Given a string array arr[] of length N, the task is to find the maximum number of strings that share a common prefix of length… Read More
Given a string S of numbers of length N, the task is to find the minimum number of operations required to change a string into… Read More
Given two arrays A[] and B[] of size N each, the task is to find the number of elements in array B[] that occur before… Read More
Given a String ( S ) of length N and with that String, we need to print a triangle out of it. The triangle should… Read More
Given an array arr[] of length N consisting of uppercase English letters only and a letter ch. the task is to find the final array… Read More
Given an array A[] of N elements, the task is to create a Prefix-MEX array for this given array. Prefix-MEX array B[] of an array… Read More
Given a binary string S, the task is to make a binary string of size N from the given string S (don’t change the position… Read More
Given a string S of length N, the task is to remove the longest prefix of the string which has at least one duplicate substring… Read More
Given a string S of length N, the task is to find the length of the longest substring X of the string S such that:… Read More
Given two integers N, Y, generate a permutation of length N such that sum of all prefix minimum of that permutation is Y. Example:  Input:… Read More
Given an array arr[]of integers with length N and an integer X, the task is to calculate the number of subarrays with median greater than… Read More
Given an array arr[], the task is to calculate the total number of indices where all elements in the left part is less than all… Read More

Start Your Coding Journey Now!