@@ -60,67 +60,6 @@ JavaScript Code:
6060/*
6161 * @lc app=leetcode id=191 lang=javascript
6262 *
63- * [191] Number of 1 Bits
64- *
65- * https://leetcode.com/problems/number-of-1-bits/description/
66- *
67- * algorithms
68- * Easy (42.10%)
69- * Total Accepted: 247.4K
70- * Total Submissions: 583.3K
71- * Testcase Example: '00000000000000000000000000001011'
72- *
73- * Write a function that takes an unsigned integer and return the number of '1'
74- * bits it has (also known as the Hamming weight).
75- *
76- *
77- *
78- * Example 1:
79- *
80- *
81- * Input: 00000000000000000000000000001011
82- * Output: 3
83- * Explanation: The input binary string 00000000000000000000000000001011 has a
84- * total of three '1' bits.
85- *
86- *
87- * Example 2:
88- *
89- *
90- * Input: 00000000000000000000000010000000
91- * Output: 1
92- * Explanation: The input binary string 00000000000000000000000010000000 has a
93- * total of one '1' bit.
94- *
95- *
96- * Example 3:
97- *
98- *
99- * Input: 11111111111111111111111111111101
100- * Output: 31
101- * Explanation: The input binary string 11111111111111111111111111111101 has a
102- * total of thirty one '1' bits.
103- *
104- *
105- *
106- * Note:
107- *
108- *
109- * Note that in some languages such as Java, there is no unsigned integer type.
110- * In this case, the input will be given as signed integer type and should not
111- * affect your implementation, as the internal binary representation of the
112- * integer is the same whether it is signed or unsigned.
113- * In Java, the compiler represents the signed integers using 2's complement
114- * notation. Therefore, in Example 3 above the input represents the signed
115- * integer -3.
116- *
117- *
118- *
119- *
120- * Follow up:
121- *
122- * If this function is called many times, how would you optimize it?
123- *
12463 */
12564/**
12665 * @param {number} n - a positive integer
0 commit comments