06-18-2015 04:48 AM
Challenge:
Create a VI that will determine the largest integer that can result from performing a series of any number of digit rotations on an inputted integer.
The VI must perform at least 1 digit rotation. Digit rotations can be in either direction (moving the first digit to the end of the number or moving the last digit to the front of the number), but the series must always go in the same direction. If there are any leading zeros after digit rotation they must be removed. The Inputted integer will always be positive.
06-18-2015 04:53 AM
Here's my attempt.
I mis-interpreted the 'Digit rotations can be in either direction' bit, I thought this meant you could chose so it only goes one way.
Also leading zeroes are removed (or, not displayed anyway) but this doen't carry on to the next rotation - as it wasn't explicitly asked for 😛
For fun I added a spinning graphic that is supposed to slow down then stop and give the answer.
06-30-2015 11:03 AM
Here is my solution.