Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitfff0041

Browse files
committed
make the variables name more sense
1 parent4285701 commitfff0041

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

‎algorithms/cpp/binaryWatch/BinaryWatch.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828

2929
classSolution {
3030
private:
31-
voidcombination(intlen,intn,int max,bool zero,
31+
voidcombination(intnLED,intnLight,int max,bool zero,
3232
int start,int k,int solution,
3333
vector<vector<string>>& result) {
3434
if (solution > max){
@@ -41,12 +41,12 @@ class Solution {
4141
}else{
4242
sprintf(tmp,"%d", solution);
4343
}
44-
result[n].push_back(tmp);
44+
result[nLight].push_back(tmp);
4545
return;
4646
}
47-
for (int i=start; i<=len-k; i++) {
47+
for (int i=start; i<=nLED-k; i++) {
4848
solution +=pow(2, i);
49-
combination(len, n, max, zero, i+1, k-1, solution, result);
49+
combination(nLED, nLight, max, zero, i+1, k-1, solution, result);
5050
solution -=pow(2, i);
5151
}
5252
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp