Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR C

populate a map c++

for (int i = 0; i < nums.size(); i++) {
        if (freq_map.find(nums[i]) != freq_map.end()) {
            freq_map[nums[i]]++;
          // hello
        }
        else {
            freq_map[nums[i]] = 1;
        }
    }
 
PREVIOUS NEXT
Tagged: #populate #map
ADD COMMENT
Topic
Name
9+4 =