or, you know, skip the multi-precision math and just sort the letters of the words in alphabetical orderhttps://twitter.com/fermatslibrary/status/875340896379817984 …
You can add location information to your Tweets, such as your city or precise location, from the web and via third-party applications. You always have the option to delete your Tweet location history. Learn more
This sort (radix is the obviously-correct choice) is O(n) assuming you count arithmetic ops as O(1).
Radix sort has roughly same storage/working-space requirements as this "clever" algo, but much lower cost of arithmetic (just incs & cmps).
thatsthejoke.gif
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.