Rotate an array based on input k. Note that k can be negative or greater than the array length, so take the modulus first. Then output the doubled array starting at offset size-k.
| |
Rotate an array based on input k. Note that k can be negative or greater than the array length, so take the modulus first. Then output the doubled array starting at offset size-k.
| |