This language bar is your friend. Select your favorite languages!

Idiom #170 Get map size

Set n to the number of elements stored in mymap.

This is not always equal to the map capacity.

int n = mymap.size();
n := len(mymap)
n = len(mymap)
n = mymap.size
let n = mymap.len();

Do you know the best way to do this in your language ?
New implementation...

Idiom created by

Related idioms