Skip to content

Commit

Permalink
Refactor variable name
Browse files Browse the repository at this point in the history
Refactor variable name to align with written description
  • Loading branch information
roundspecs authored Sep 12, 2023
1 parent f38883c commit 7fdbed3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/algebra/binary-exp.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,13 +144,13 @@ vector<int> applyPermutation(vector<int> sequence, vector<int> permutation) {
return newSequence;
}
vector<int> permute(vector<int> sequence, vector<int> permutation, long long b) {
while (b > 0) {
if (b & 1) {
vector<int> permute(vector<int> sequence, vector<int> permutation, long long k) {
while (k > 0) {
if (k & 1) {
sequence = applyPermutation(sequence, permutation);
}
permutation = applyPermutation(permutation, permutation);
b >>= 1;
k >>= 1;
}
return sequence;
}
Expand Down

0 comments on commit 7fdbed3

Please sign in to comment.