deno.land / x / masx200_leetcode_test@10.6.5 / number-of-1-bits / index.ts
12345678export default function hammingWeight(n: number): number { let count = 0; for (const char of n.toString(2)) { if (char === "1") count++; } return count;}
Version Info