What is an array? An array in any programming language is a data structure that is used to store elements or data items of similar… Read More

# Tag Archives: cpp-map

What is a tuple? A tuple in C++ is an object that has the ability to group a number of elements. The elements can be… Read More

Given an array arr having N strings and an integer K, the task is to find the lexicographically smallest Kth distinct string. Print an empty… Read More

Priority Queue Priority queues are a type of container adapters, specifically designed such that the first element of the queue is the greatest of all… Read More

Map in C++ STL Map stores unique key-value pairs in a sorted manner. Each key is uniquely associated with a value that may or may… Read More

Maps are associative containers that store elements in a mapped fashion. Each element has a key value and a mapped value. No two mapped values… Read More

Given an array, arr[] of N elements and an integer K, the task is to find the number of pairs (i, j) such that the… Read More

There are some data structures that are supported by g++ compiler and are not a part of the C++ standard library. One of these is:… Read More

Max count of N using digits of M such that 2 and 5, and, 6 and 9 can be treated as same respectively

Given an integer N, and the string integer M, the task is to find the total count to make N by using the digits of… Read More

Given two arrays, A[] and B[] consisting of M pairs, representing the edges of the two binary trees of N distinct nodes according to the… Read More

Given an array, arr[] consisting of N strings where each character of the string is lower case English alphabet, the task is to store and… Read More

Given an array arr[] of N integers, the task is to find the maximum prefix length of the array such that removing exactly one element… Read More