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.
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();
generic function Card<T>(const ASet: T): Integer;
var
Bytes: array [0..31] of byte;absolute ASet;
i: Integer;
begin
if GetTypeKind(T) <> tkSet then
Exit(-1);
if (SizeOf(ASet) > 32) then
Exit(-1);
Result := 0;
for i := 0 to SizeOf(T) - 1 do
Result := Result + PopCnt(Bytes[i]);
end;
begin
n:=Card(X);
end.
n = len(x)
n = x.size
let n = x.len();