Skip to content

Instantly share code, notes, and snippets.

@epatel
epatel / cars.cpp
Created July 29, 2011 19:06
Counting words (car names) and sorting occurrences
#include <iostream>
#include <list>
#include <map>
using namespace std;
bool my_pair_compare(pair<string,int> &a, pair<string,int> &b) {
return a.second > b.second;
}