"Data structure" data structure and algorithm (i)--linear structure __java

Source: Internet
Author: User
First, the preface

Linear structure is a kind of basic data structure, which is mainly used to describe a single precursor and subsequent data relationship in the objective world. That is, "arrange one after another." The characteristic is that the data element presents a linear relationship. Ii. Introduction of the content


2.1 Linear Table


    ① Sequential storage: Insert the average number of moves is N/2, delete the average number of moves is (n-1)/2

    ② chain storage: Divided into many kinds of two-way linked list, circular linked list, static linked list. The test center is the writing list inserts, deletes the code.
2.2 Stacks and Queues

Characteristics:

① Stack: * * Advanced after the * *, can be recursive call;

② Queue: * * Advanced First OUT * *, can not be recursive call;


Storage mode:


2.3 Series

Defined:
A string is a special linear table in which the period data element is a character. A string is a finite sequence consisting of 0 or more characters. Generally remember s= ' a1a2....an ' where S is a string, and the sequence of characters enclosed in single quotes is a string value; AI (1〈=i〈=n) can be a letter, a number, or another character; the number of characters in a string is the length of the string. A string of zero length is called an empty string, and it does not contain any characters.

Storage mode:

    ① Sequential storage: A set of contiguous storage units to store string-valued character sequences.

    ② Chained storage: Each node can store a single character, or can store more than one character, this time to consider the storage density.
Three, contrast memory

Some of these concepts can be done by comparing memory, and some of the core of knowledge can be compared to learn, this is to provide you with the learning method, this is a good idea, memory profound, but also can improve their level. Iv. Summary

So through the constant attack, the time to harvest the results finally came. Data structure is to abstract their own things, through the control of this country, small knitting so constantly completed, refueling.
The next small story will bring you the "data structure" data structure and algorithm (i)--Nonlinear structure

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.