// Map: counts, value -> index
const m = new Map();
m.set(k, (m.get(k) ?? 0) + 1);
m.has(k); m.get(k); m.delete(k);
for (const [k, v] of m) {}
[...m.values()]
// Set
const s = new Set();
s.add(x); s.has(x); s.size;
// Arrays
const a = Array.from({ length: n }, () => []);
a.sort((x, y) => x - y); // ALWAYS pass this
a.slice(i, j); a.at(-1);
const stack = []; stack.push(x); stack.pop();
// Strings
for (const c of str) {}
[...str].sort().join("");
str.toLowerCase(); /[a-z0-9]/i.test(c)
Math.floor((lo + hi) / 2); lo + hi >> 1