Skip to content

Commit fff0041

Browse files
committed
make the variables name more sense
1 parent 4285701 commit fff0041

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

‎algorithms/cpp/binaryWatch/BinaryWatch.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828

2929
class Solution {
3030
private:
31-
void combination(int len, int n, int max, bool zero,
31+
void combination(int nLED, int nLight, 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)