## Maximize the sum of differences of consecutive elements after removing exactly K elements

Given a sorted array arr[] of length N and an integer K such that K < N, the task is to remove exactly K elements… Read More »

Given a sorted array arr[] of length N and an integer K such that K < N, the task is to remove exactly K elements… Read More »

Given an array of positive distinct integers arr[], the task is to find the final number obtained by performing the following operation on the elements… Read More »

Given a binary string str of length N, the task is to find the maximum count of substrings str can be divided into such that… Read More »

Given a string str, the task is to check whether all the substrings of length ≥ 2 have the number of vowels at least as… Read More »

Given an array arr[] of N elements, the task is to find the count of triplets (arr[i], arr[j], arr[k]) such that (arr[i] + arr[j] +… Read More »

Given an array arr[] of N integers, the task is to find and print the Longest Increasing Subsequence. Examples: Input: arr[] = {12, 34, 1,… Read More »

Given a number represented as a string str consisting of the digit 1 only i.e. 1, 11, 111, …. The task is to find the… Read More »

Given a binary number as a string str of length L. The task is to find the minimum number of operations needed so that the… Read More »

Implement a dictionary using Trie such that if the input is a string representing a word, the program prints its meaning from the prebuilt dictionary.… Read More »

Given a set of product reviews (R) by different customers and a string S containing good words separated by a _, the task is to… Read More »

Given an array arr[] of N elements, the task is to find the length of the smallest sub-array which has sequence {0, 1, 2, 3,… Read More »

Given an array Row[] of size R where Row[i] is the sum of elements of the ith row and another array Column[] of size C… Read More »

Given some rules to generate an N * N matrix mat[][] and two integers R and C, the task is to find the element at… Read More »

Given a string, we need to find the minimum number of rotations required to get the same string. In this case, we will only consider… Read More »

Given a string, find a prefix with the highest frequency. If two prefixes have the same frequency then consider the one with maximum length. Examples:… Read More »