# Search code, repositories, users, issues, pull requests...

submited by
Style Pass
2024-07-25 17:30:06

Ever since I took my first Data Structures and Algorithms course, I became fascinated with sorting algorithms. And given that sorting algorithms are a dime a dozen, I thought "Why not create my own?". This project is exactly an attempt at that. If you want the final version of this algorithm scroll all the way to the bottom. But for now, let's start with the seed idea that sparked the new algorithm.

When comparing strings such as Apple and Application, we have to go all the way to the 5th letter to realize that 'e' is less than 'i' and therefore Apple is less than Application. However, if these words were converted to a number, the comparison would be instant.

Well let's start with an excel sheet; that's where I got the idea. That's right, an excel sheet. In excel sheets you have columns that are ordered by letters A...Z, AA, AB, etc..

If you notice the pattern here, we multiply by an order of 26 every time we add another letter, then we add the value of the new letter, and since we are starting at index 1, we add one to the result: