## Check if given Sudoku board configuration is valid or not

Given a Sudoku Board configuration, check whether it is valid or not. Examples: Input: [5 3 – – 7 – – – -] [6 -… Read More »

- Maximum of all Subarrays of size k using set in C++ STL
- Find Maximum and Minimum element in a Set in C++ STL
- How to delete last element from a set in C++
- Closest greater or same value on left side for every element in array
- Count triplet pairs (A, B, C) of points in 2-D space that satisfy the given condition
- How to traverse a C++ set in reverse direction
- Smallest Greater (than S) String of length K whose letters are subset of S
- Count pairs from two arrays whose modulo operation yields K
- Print all integers that are sum of powers of two given numbers
- Minimum Numbers of cells that are connected with the smallest path between 3 given cells
- Find the lexicographically smallest sequence which can be formed by re-arranging elements of second array
- How to delete an element from the Set by passing its value in C++
- Greatest number less than equal to B that can be formed from the digits of A
- Total distinct pairs from two arrays such that second number can be obtained by inverting bits of first
- Distinct pairs from given arrays (a[i], b[j]) such that (a[i] + b[j]) is a Fibonacci number
- Distinct state codes that appear in a string as contiguous sub-strings
- How to delete a range of values from the Set using Iterator

Given a Sudoku Board configuration, check whether it is valid or not. Examples: Input: [5 3 – – 7 – – – -] [6 -… Read More »

set::rbegin() is a built-in function in C++ STL which returns a reverse iterator pointing to the last element in the container. Syntax: reverse_iterator set_name.rbegin() Parameters:… Read More »

Suppose there are n towns connected by m bidirectional roads. There are s towns among them with a police station. We want to find out… Read More »

Pre-requisite : set in C++, unordered_set in C++ Differences : | set | unordered_set ——————————————————— Ordering | increasing order | no ordering | (by default)… Read More »

set and map in STL are similar in the sense that they both use Red Black Tree (A self balancing BST). Note that the time… Read More »

Prerequisite :Basic knowledge of STL and Sets Data structure. About ordered set Ordered set is a policy based data structure in g++ that keeps the… Read More »

Write a function to count number of smaller elements on right of each element in an array. Given an unsorted array arr[] of distinct integers,… Read More »

Given a set of N elements such that N, task is to generate an array such that the GCD of any subset of the generated… Read More »

Given an array of elements, task is to sort these elements using stack. Prerequisites : Stacks Examples : Input : 8 5 7 1 9… Read More »

Given two integers L and R. Find the number of perfect powers in the given range [L, R]. A number x is said to be… Read More »

The C++ STL set is a data structure used to store the distinct value in ascending or descending order. By default, we can use it… Read More »

Given an array that might contain duplicates, print all distinct elements in sorted order. Examples: Input : 1, 3, 2, 2, 1 Output : 1… Read More »

An array is given of n length, and we need to calculate the next greater element for each element in given array. If next greater… Read More »

Given a Binary Tree, convert it to a Binary Search Tree. The conversion must be done in such a way that keeps the original structure… Read More »

Assign value by a pair of {} to a container filter_none edit close play_arrow link brightness_4 code // Lots of programmers write code // like… Read More »