Mode of a vector based on a hash-table.