Skip to content

Instantly share code, notes, and snippets.

@jacobmischka
Created December 11, 2017 21:40
Show Gist options
  • Save jacobmischka/35eecaf48db9989863311574e6a2ec20 to your computer and use it in GitHub Desktop.
Save jacobmischka/35eecaf48db9989863311574e6a2ec20 to your computer and use it in GitHub Desktop.
int skip = 0;
int position = 0;
int length;
for (int i = 0; i < NUM_ROUNDS; i++) {
for (iter = lengths.begin(); iter != lengths.end(); iter++) {
length = *iter;
reverse(list, LIST_SIZE, position, position + length - 1);
position += length + skip;
skip++;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment