Skip to content

Commit c00c495

Browse files
authored
Update minimum-numbers-of-function-calls-to-make-target-array.cpp
1 parent c666d3f commit c00c495

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

C++/minimum-numbers-of-function-calls-to-make-target-array.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
class Solution {
55
public:
66
int minOperations(vector<int>& nums) {
7-
int result = 0, max_len = 1;
7+
int result = 0, max_len = 0;
88
for (const auto& num : nums) {
99
result += __builtin_popcount(num);
1010
max_len = max(max_len, bit_length(num));

0 commit comments

Comments
 (0)