Given an array arr[] of size N, the task is to find the smallest positive integer K such that incrementing or decrementing each array element… Read More

# Tag Archives: cpp-set

Given an array arr[] of size N, the task is to make all array elements equal to 0 by replacing all elements of a subsequences… Read More

Given an array arr[] of size N, the task is for each array element is to find the nearest non-equal value present on its left… Read More

Given an undirected graph G with vertices numbered in the range [0, N] and an array Edges[][] consisting of M edges, the task is to… Read More

Given an array arr[] consisting of N positive integers, the task is to minimize the maximum difference between any pair of array elements by multiplying… Read More

Given two strings str1 and str2, the task is to check if a string str1 can be converted to string str2 by performing the following… Read More

Vectors: Vectors are containers similar to dynamic arrays with the ability to resize when a new element is inserted or deleted from it. It is… Read More

Set: Set is a type of associative container which stores elements in a sorted manner. All the elements of a set are unique and can… Read More

Given an array arr[] consisting of N non-negative integers, the task is to count the number of array elements whose product of digits is a… Read More

Given an array arr[] of size N, the task is to find the composite Fibonacci numbers present in the given array. Examples: Input: arr[] =… Read More

Given two strings S1 and S2, the task is to check if it’s possible to generate string S2 by repeatedly appending subsequences of S1 to… Read More

Given an array of strings arr[], the task is to count the number of distinct strings that can be generated from the given array by… Read More

Given a singly linked list containing N nodes, the task is to find the mean of all the distinct nodes from the list whose data… Read More

Given an array arr[] consisting of N distinct integers and an integer K, the task is to find the maximum MEX from all subarrays of… Read More