Final considerations
Before we end this chapter, here are some final considerations.
First of all, as mentioned at the beginning of this chapter, the solutions to the two problems we presented do not claim to be the most elegant, nor the most efficient. There are faster algorithms we could have written that would perform much better on inputs of larger size.
Moreover, the way in which we structured the code, using OOP for Camel Cards and a functional approach for Cosmic Expansion, was just to make sure we could show you different ways of structuring code to solve a given problem.
Furthermore, we could have chosen other ways to split the solutions into classes and functions, and we could have also used different data structures to represent the data.
We have tried to prioritize readability and simplicity, overall, while still offering you a peek into concepts we have not been able to explore in the rest of the book, such as the use of custom comparator functions, or...