Algorithm (4th edition) -1.3.4 overview

Source: Internet
Author: User
Tags instance method

Focus:

1. An in-depth understanding of the backpacks, queues, and stacks that support generics and iterations is important for three reasons:

· We will construct the other more advanced data structures in this book with these data types as the cornerstone;

· They demonstrate the relationship between data structures and algorithms and the challenges of meeting multiple potentially conflicting performance goals;

· Some of the algorithms we are going to learn focus on the need for the abstract data types to support powerful operations on collections of objects, which are our starting points.

2. We now have two ways to represent collections of objects, that is, arrays and linked lists. Java has built-in arrays, and linked lists are easy to implement in Java's standard way. Both are very basic and are often referred to as sequential storage and chained storage.

Later in this book, we will extend these basic data structures in a variety of ways in the implementation of various abstract data types:

One of the most important extensions is a variety of data structures with multiple links, such as binary trees;

Another important extension is the composite data structure: We can use the Backpack storage stack, the queue to store arrays and so on, for example, we can use an array of backpacks to represent it.

It's easy to define arbitrarily complex data structures in this way, and one of the important reasons we focus on abstract data types is trying to control this complexity.

3. When researching a new application area, we will follow the steps below to identify the target and use the data abstraction to solve the problem:

· Define the API;

· Develop use case code based on specific application scenarios;

· Describes a data structure (a representation of a set of values) and defines an instance variable of the class according to the implementation of the abstract data type corresponding to the API;

· Describe the algorithm (the way to implement a set of actions) and implement the instance method in the class according to it;

· Analyze the performance characteristics of the algorithm.

Algorithm (4th edition) -1.3.4 overview

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.