Logo

Programming-Idioms

# 373 Size of set
Set n to the number of elements of the set x.
New implementation

Be concise.

Be useful.

All contributions dictatorially edited by webmasters to match personal tastes.

Please do not paste any copyright violating material.

Please try to avoid dependencies to third-party libraries and frameworks.

Other implementations
int n (x.size());
final aSet = Set();
// omitted: add elements to aSet
final n = aSet.length;
n := len(x)
let n = x.size
int n = x.size();
n = len(x)
n = x.size