Skip to content

Tag Archives: prefix

Given string str having N characters representing an integer, the task is to calculate the sum of all possible prefixes of the given string. Example:… Read More
Given two arrays A[] and B[] of size N each, the task is to minimize A[i] + B[j] such that j ≥ i. Examples: Input:… Read More
Given a string str and an array of words word[], the task is to find whether str is a prefix string of word[]. Examples: Input:… Read More
Given an array arr consisting of N elements and Q queries of the following two types:   1 K: For this type of query, the array… Read More
Given an array arr consisting of N elements and Q queries of the following two types:   1 K: For this type of query, the array… Read More
Given an array arr consisting of N elements and Q queries of the following two types:   1 K: For this type of query, the array… Read More
Given an array arr consisting of N elements and Q queries of the following two types:   1 K: For this type of query, the array… Read More
Given an array arr[] of size N and an integer K, the task is to find all the indices in the given array having at… Read More
Given an array arr[] containing N positive integers, the task is to find the total number of elements in the array that are divisible by… Read More
Given an array arr[] containing integers. The task is to find the largest subsequence such that at any point in time prefix sum of that… Read More
Given an array arr[] of size N ana an integer P, the task is to find the original array from the array obtained by P… 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 an integer N, the task is to find the minimum number of operations required to make N even such that in one operation prefix… Read More
Given a string S containing N lowercase English alphabets and a dictionary Dict that maps all lowercase English alphabets from ‘a’ to ‘z’ to either… Read More
Given string str of size N containing only lowercase English letters. The task is to encrypt the string such that the substrings having same prefix… Read More

Start Your Coding Journey Now!