Skip to content

Tag Archives: cpp-set

Given an array arr[] of integers of size N that might contain duplicates, the task is to find all possible unique subsets, using C++ STL.… Read More
Given two strings, text and pattern, of size N and M (N > M)respectively, the task is to print all occurrences of pattern in text. … Read More
A set is an associative container available in the C++ Standard Template Library(STL) that is used for unique elements in a specific order, it internally… Read More
Given an array arr[] of size N and an integer K, the task is to find the minimum operations such that no variable is divisible… Read More
Given an array arr[] of length N and integer K, the task is to print subarray ranges (starting index, ending index) of the array where… Read More
Given an array arr[] of size N and a number K, the task is to find the sum of the first K natural numbers that… Read More
Given an N-ary tree consisting of N nodes with values from 1 to N rooted at 1, for all nodes, print the number of ancestors… Read More
Given a string str of size N containing all possible characters including integers. Print Kth distinct character from the starting of the given string. If… Read More
Given a matrix arr[][] of size N*M The task is to find the index of the row that has the maximum unique elements. If there… Read More
Prerequisites: Random-access Iterators, Bidirectional Iterators Sets are a type of associative container in which each element has to be unique because the value of the… Read More
Given an array of strings arr[], the task is to find the smallest string which contains all the characters of the given array of strings.… Read More
Given an array arr[] of N integers and an array query[] having Q integers, the task is to print the array arr[] after moving the… Read More
Given an array of strings arr[]. The task is to generate the string which contains all the characters of all the strings present in array… Read More
Given a positive integer N, the task is to find the length of largest set that can be generated such that if i is present,… Read More
Given a set of integers of N elements. The task is to print the absolute difference of all of the pairwise consecutive elements in a… Read More

Start Your Coding Journey Now!