Chapter 9. Choosing the Perfect Algorithm
In this chapter, we are going to describe some problems/applications that exist nowadays and how to solve them with algorithms and data structures. We have been preparing ourselves during the last eight chapters, learning the basic and advanced concepts of data structures and algorithms and their corresponding implementations in Swift. Now we are going to describe scenarios that exist in the real world and we are going to solve them by applying the concepts that we have learned throughout this book.
Have you ever attached a URL link in any social network status with a limited count of characters? Have you ever noticed how some Internet applications change long and redundant URLs to tiny, shorter ones? They do it in order to save space and memory, but with an additional benefit for the user, that is, to save you some characters and to allow you to write more content. This is one of the example scenarios that we are going to explain...