Skip to content

Commit 7fdbed3

Browse files
authored
Refactor variable name
Refactor variable name to align with written description
1 parent f38883c commit 7fdbed3

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/algebra/binary-exp.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -144,13 +144,13 @@ vector<int> applyPermutation(vector<int> sequence, vector<int> permutation) {
144144
return newSequence;
145145
}
146146
147-
vector<int> permute(vector<int> sequence, vector<int> permutation, long long b) {
148-
while (b > 0) {
149-
if (b & 1) {
147+
vector<int> permute(vector<int> sequence, vector<int> permutation, long long k) {
148+
while (k > 0) {
149+
if (k & 1) {
150150
sequence = applyPermutation(sequence, permutation);
151151
}
152152
permutation = applyPermutation(permutation, permutation);
153-
b >>= 1;
153+
k >>= 1;
154154
}
155155
return sequence;
156156
}

0 commit comments

Comments
 (0)