Input : Map : 1 -> 4, 2 -> 6, 4 -> 6 Check1 : 5, Check2 : 4 Output : 5 : Not present, 4 : Present
C++ implementation :
5: Not Present 4: Present
This article is contributed by Rohit Thapliyal. If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please write comments if you find anything incorrect, or you want to share more information about the topic discussed above.
Rated as one of the most sought after skills in the industry, own the basics of coding with our C++ STL Course and master the very concepts by intense problem-solving.
- C++ map having key as a user define data type
- Searching in a map using std::map functions in C++
- map::at() and map::swap() in C++ STL
- Check if the given string of words can be formed from words present in the dictionary
- Understanding ShellExecute function and it's application to open a list of URLs present in a file using C++ code
- Count of elements of an array present in every row of NxM matrix
- Most frequent word in first String which is not present in second String
- Elements present in first array and not in second using STL in C++
- Count of elements A[i] such that A[i] + 1 is also present in the Array
- Sum of all Palindrome Numbers present in a Linked list
- Count of anagrams of each string in an array present in another array
- Count of words that are present in all the given sentences
- Find the character in first string that is present at minimum index in second string
- How to traverse through all values for a given key in multimap?
- Code to generate the map of India (with explanation)
- Descending order in Map and Multimap of C++ STL
- Map in C++ Standard Template Library (STL)
- Inserting elements in std::map (insert, emplace and operator )
- Different ways to delete elements in std::map (erase() and clear())
- Hash Table vs STL Map
Improved By : preethibr1