Skip to content

Tag Archives: cpp-set

Given an array A[] of N positive integers and 3 integers X, Y, and Z, the task is to check if there exist 4 indices… Read More
In computer science, a set is an abstract data type that stores distinct objects that are of the same type. The objects can be numbers,… 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 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

Start Your Coding Journey Now!