Tutorials
Courses
Data Structure
Java
Python
HTML
Interview Preparation
DSA
Practice Problems
C
C++
Java
Python
JavaScript
Data Science
Machine Learning
Courses
Linux
DevOps
SQL
Web Development
System Design
Aptitude
GfG Premium
Similar Topics
Web Technologies
37.4K+ articles
Misc
8.5K+ articles
Mathematical
7.6K+ articles
Arrays
6.1K+ articles
Competitive Programming
3.1K+ articles
Strings
3.0K+ articles
Greedy
2.1K+ articles
Algorithms
1.9K+ articles
Sorting
1.7K+ articles
Searching
1.6K+ articles
DSA
/
Data Structures
/
Map
Map
47 posts
Recent Articles
Popular Articles
Minimize Cost by selecting Distinct values from Array A
Last Updated: 04 December 2023
Given an array A and cost array B of size N. The task is to determine the minimum cost(given in array B) by choosing all distinct values from array A. Note: A[i] will cos...
read more
Geeks Premier League
DSA
Arrays
Map
Geeks Premier League 2023
Minimum cost to make all elements with same frequency equal
Last Updated: 04 December 2023
Given an array arr[] of integers, the task is to find the minimum cost for making all the integers that have the same frequency equal. By performing one operation you can ...
read more
Hash
DSA
cpp-map
Map
Maximum number of Valid Pairs satisfying conditions k*(j - i) != (arr[j] - arr[i])/k
Last Updated: 07 December 2023
Given an array arr[] of size N and an integer k, the task is to find the maximum number of valid pair of indices (i, j) such that i j and k*(j - i) != (arr[j] - arr[i])/k...
read more
Geeks Premier League
DSA
Map
Geeks Premier League 2023
valid pairs
Find Maximum Powerful Integer with Occurrences ≥ k in 2D Intervals
Last Updated: 30 November 2023
Given a 2D integer array of intervals whose length is n where intervals[i]=[start, end] i.e. all integers from start to end inclusive of start and end are also present and...
read more
Geeks Premier League
DSA
Hash
Map
Geeks Premier League 2023
Maximize number of indices with prefix sum equal to 0
Last Updated: 10 April 2024
Given an array arr[] of size N, you can perform the following operation on the array any number of times: If arr[i]=0, we can replace it with any integer. Your task is to ...
read more
Competitive Programming
Picked
Geeks Premier League
DSA
prefix-sum
Algorithms-Dynamic Programming
Map
Geeks Premier League 2023
CSES Solutions - Concert Tickets
Last Updated: 08 August 2024
There are N concert tickets available, each with a certain price given as array tickets[]. Then, M customers arrive, one after another. Each customer announces the maximum...
read more
Sorting
Competitive Programming
Picked
DSA
Map
CSES Problems
CSES Solutions - Sum of Two values
Last Updated: 23 April 2024
You are given an array arr[] of N integers, and your task is to find two different indices whose sum is X.Examples: Input: N = 4, X = 8, arr[] = {2, 7, 5, 1}Output: 2 4Exp...
read more
Sorting
Competitive Programming
Picked
DSA
Map
CSES Problems
CSES Solutions - Playlist
Last Updated: 26 March 2024
You are given a playlist of a radio station since its establishment. The playlist has a total of N songs. What is the longest sequence of successive songs where each song ...
read more
Competitive Programming
Picked
DSA
Map
CSES Problems
Split the array into two distinct array
Last Updated: 02 April 2024
You are given an integer array arr[] of size N (N is an even number). You have to split the array into two equal parts, arr1 and arr2 such that arr1 should contain distinc...
read more
DSA
Arrays
Arrays
Map
CSES Solutions - Subarray Divisibility
Last Updated: 28 March 2024
Given an array arr[] of N integers, your task is to count the number of subarrays where the sum of values is divisible by N.Examples:Input: N = 5, arr[] = {3, 1, 2, 7, 4}O...
read more
Competitive Programming
Picked
DSA
Map
CSES Problems
CSES Solutions - Subarray Sums II
Last Updated: 28 March 2024
Given an array arr[] of N integers, your task is to count the number of subarrays having sum X.Examples: Input: N = 5, X = 7, arr[] = {2, -1, 3, 5, -2}Output: 2Explanation...
read more
Competitive Programming
Picked
DSA
prefix-sum
Map
CSES Problems
Count Lonely Pixel II
Last Updated: 28 April 2024
Given an m x n picture consisting of black 'B' and white 'W' pixels and an integer target, return the number of black lonely pixels.A black lonely pixel is a character 'B'...
read more
Strings
Picked
DSA
Google
Map
Data Structure Design for Two Sum III
Last Updated: 27 May 2024
You have to design a data structure that accepts a stream of integers and then checks if it has a pair of integers that added/sum up to a particular value.Implement theTwo...
read more
Data Structures
Picked
DSA
Linkedin
Hash
Map
Find Shortest Word Distance II
Last Updated: 06 June 2024
Design a data structure that will be initialized with a string array, and then it should answer queries of the shortest distance between two different strings from the arr...
read more
Picked
DSA
Linkedin
Map
Find Smallest Common Region
Last Updated: 17 June 2024
Given a 2D array regions[][] where the first region of each array includes all other regions in that array and two more regions r1 and r2, the task is to return the smalle...
read more
Picked
DSA
Airbnb
Interview-Questions
Map
1
2
3
4
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our
Cookie Policy
&
Privacy Policy
Got It !