Data Structures Used in Algorithms
Algorithms need in-memory data structures that can hold temporary data while executing. Choosing the right data structures is essential for their efficient implementation. Certain classes of algorithms are recursive or iterative in logic and need data structures that are specially designed for them. For example, a recursive algorithm may be more easily implemented, exhibiting better performance, if nested data structures are used. In this chapter, data structures are discussed in the context of algorithms. As we are using Python in this book, this chapter focuses on Python data structures, but the concepts presented in this chapter can be used in other languages such as Java and C++.
By the end of this chapter, you should be able to understand how Python handles complex data structures and which one should be used for a certain type of data.
Here are the main points discussed in this chapter:
- Exploring Python built-in data types
- Using Series and DataFrames
- Exploring matrices and matrix operations
- Understanding abstract data types