Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void reverse() {
- //Typo reduction, sanity production
- int len=backingArray.length;
- for (int index=0;index< (len - 2) / 2;index++) {
- int temp = backingArray[(front+index) % len];
- backingArray[(front+index) % len] = backingArray[((back-index % len) + len) % len];
- backingArray[((back-index % len) + len) % len] = temp;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement