## Choose atleast two elements from array such that their GCD is 1 and cost is minimum

Given two integer arrays arr[] and cost[] where cost[i] is the cost of choosing arr[i]. The task is to choose a subset with at least… Read More »

- Print nodes in top view of Binary Tree | Set 2
- Count distinct pairs from two arrays having same sum of digits
- Print all pairs in an unsorted array with equal sum
- Double ended priority queue
- Most frequent word in first String which is not present in second String
- map rbegin() function in C++ STL
- Remove minimum elements from array so that max <= 2 * min
- map value_comp() in C++ STL
- How to traverse a STL map in reverse direction?
- Check if frequency of character in one string is a factor or multiple of frequency of same character in other string
- map key_comp() function in C++ STL
- How to delete last element from a map in C++
- map rbegin() function in C++ STL
- map rend() function in C++ STL
- Maximum score after flipping a Binary Matrix atmost K times
- Count pairs in an array such that both elements has equal set bits
- Check if a king can move a valid move or not when N nights are there in a modified chessboard
- Find all good indices in the given Array
- Count occurrences of the average of array elements with a given number
- Find the Number of Maximum Product Quadruples
- Check whether frequency of characters in a string makes Fibonacci Sequence
- Pair with minimum absolute difference after solving each query
- String with frequency of characters in Lucas Sequence
- map get_allocator in C++ STL
- Count of numbers appearing in the given ranges at-least K times
- map key_comp() in C++ STL

Given two integer arrays arr[] and cost[] where cost[i] is the cost of choosing arr[i]. The task is to choose a subset with at least… Read More »

map::get_allocator() is a built in function in C++ STL which is used to get allocator of container map. Syntax: Allocator_type get_allocator() Parameters: This function does… Read More »

Given an array of N positive elements find the number of quadruple, (i, j, k, m) such that i < j < k < m… Read More »

If we wish to delete the last element from a map, we can use following methods : using prev(mp.end()) : what prev function do is,… Read More »

Map stores the elements in sorted order of keys. Now if we want to traverse it in reverse order we will use reverse_iterator of map.… Read More »

Given an array arr, the task is to remove minimum number of elements such that after their removal, max(arr) <= 2 * min(arr). Examples: Input:… Read More »

A double ended priority queue supports operations of both max heap (a max priority queue) and min heap (a min priority queue). The following operations… Read More »

Given two arrays arr1[] and arr2[]. The task is to find the total number of distinct pairs(formed by picking 1 element from arr1 and one… Read More »

Given an unsorted array A[]. The task is to print all unique pairs in the unsorted array with equal sum. Note: Print the result in… Read More »

Given an array A[] of integers. The task is to print all indices of this array such that after removing the ith element from the… Read More »

Given two strings, the task is to check whether the frequencies of a character(for each character) in one string is a multiple or a factor… Read More »

Given an array arr with unique elements, the task is to count the total number of pairs of elements that have equal set bits count.… Read More »

Given an array of integers and an integer . For every integer of the array a[i], the task is to calculate the count of numbers… Read More »

Given a string with lowercase English alphabets. The task is to check whether the frequency of the characters in the string can be arranged as… Read More »

Given two string ‘S1’ and ‘S2’, the task is to return the most frequent (which is used the maximum number of times) word from ‘S1’… Read More »