Get your surfboard ready, we are heading to the sea ... and the less than relaxed and laid back world of CSRF (pronounced "sea surf") attacks!
Time for a nice little side project: let's build a link shortening service! Actually, more than giving you all the code to achieve it, we will go over the process of spec'ing and architecting one such service, following a given set of constraints.
Ranges are natively supported by a few (popular) programming languages. They allow for iteration over a defined space, while not having a linear increase in their memory footprint (all ranges always store a similar amount of data).
As sorting is a common operation on arrays, a more scalable and less error-prone strategy would be to define common compare functions. Let's build said compare functions!