
Logically, data structures can be divided into two categories: linear structures and non-linear structures.
The logical structure of data: refers to the data structure that reflects the logical relationship between data elements. The logical relationship refers to the before and after relationship between data elements, regardless of their storage location in the computer.
Linear structure is an ordered (ordered) set of n data elements. It has four basic characteristics:
1. There must be a unique "first element" in the set;
2. There must be a unique "last element" in the set;
3. Except for the last element, all other data elements have a unique "successor";
4. Except for the first element, all other data elements have a unique "predecessor" .
Linear structure in data structure refers to a data structure in which there is a "one-to-one" linear relationship between data elements.
Corresponding to the linear structure, the logical characteristic of the nonlinear structure is that one node element may correspond to multiple direct predecessors and multiple successors.
Commonly used linear structures include: linear list, stack, queue, double queue, array, and string.
Regarding the generalized table, it is a non-linear data structure.
Common nonlinear structures include: trees (binary trees, etc.), graphs (nets, etc.).
The above is the detailed content of What can data structures be logically divided into?. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

PhpStorm Mac version
The latest (2018.2.1) professional PHP integrated development tool

WebStorm Mac version
Useful JavaScript development tools

Atom editor mac version download
The most popular open source editor

Dreamweaver Mac version
Visual web development tools





