Skip to main content
6 of 11
edited tags
Jo King
  • 47.5k
  • 5
  • 125
  • 186

Iterate base-36 instead of only integer

This is a code golf version of a similar question I asked on stack earlier but thought it'd be an interesting puzzle.

Have a 10-length string starting from

0000000000

Iterate through till you get to

0000000009

Then start using letters in place to get 36 total iterators

loop 25 times to 10

Then push to the next character

000000010

And repeat.

The goal of this puzzle is to get the least amount of bytes and create a base-36 iterator, the cycling engine for a loop that is able to convert any string into the next string.

There should be a total of 3,656,158,440,062,976 (3 quadrillions) possible iterations from the base-36 that I have explained here, but I don't expect you to iterate through all of them ;-)

Fake points if you can take the string (e.g. aa820s) and convert it into an integer-version of itself. (e.g. 0000000000 is 1, 0000000010 is 37)

Jack Hales
  • 359
  • 2
  • 10