cpp unordered map has key

Solutions on MaxInterview for cpp unordered map has key by the best coders in the world

we are a community of more than 2 million smartest coders
registration for
employee referral programs
are now open
get referred to google, amazon, flipkart and more
register now
  
pinned-register now
showing results for - "cpp unordered map has key"
Erica
18 Feb 2016
1// Function to check if the key is present or not
2string check_key(map<int, int> m, int key)
3{
4    // Key is not present
5    if (m.find(key) == m.end())
6        return "Not Present";
7  
8    return "Present";
9}