Книга: A Common-Sense Guide to Data Structures and Algorithms in Python, Volume 1
Назад: Exercises
Дальше: Prerequisite: Determine Your Current Big O

Chapter 20
Techniques for Code Optimization

We’ve come a long way. You now have the tools to analyze the time and space complexity of algorithms across a wide variety of data structures. With these concepts, you’re now able to write code that is fast, memory-efficient, and beautiful.

In this final chapter of our journey, I’d like to leave you with some additional techniques for optimizing code. Sometimes it’s difficult to see how an algorithm can be improved. Over the years, I’ve found the following mental strategies help me see how I can make my code more efficient. I hope they’ll be helpful to you as well.

Назад: Exercises
Дальше: Prerequisite: Determine Your Current Big O