Summary
In this chapter, we have learned how to deal with problems that require algorithms and data structures by:
- Creating a high-level approach of the solution.
- Writing and describing the Swift implementation.
- Calculating Big-O complexities of our solution to check if the algorithm behaves properly for a real-world situation.
- Measuring and detecting bottlenecks.
- Modifying them to achieve a better performance with an alternative solution.
Moreover, and in order to learn this, we have seen what a Bloom filter is and how to display graphs in the playground to analyze results more easily.
We have created two solutions for two problems, and after a Big-O analysis and with the help of algorithms and data structures, we have improved our solutions a lot and we have made our code more efficient. That was the goal of this chapter, and of the entire book itself. Congratulations!