Data Structures Algorithms 简明教程

Data Structure Basics

本教程将解释与数据结构相关的基本术语。

This tutorial explains the basic terms related to data structure.

Data Definition

数据定义通过以下特征定义特定数据。

Data Definition defines a particular data with the following characteristics.

  1. Atomic − Definition should define a single concept.

  2. Traceable − Definition should be able to be mapped to some data element.

  3. Accurate − Definition should be unambiguous.

  4. Clear and Concise − Definition should be understandable.

Data Object

数据对象表示具有数据的一个对象。

Data Object represents an object having a data.

Data Type

数据类型是一种分类各种数据类型(例如整数、字符串等)的方式,它确定哪些值可以与相应的数据类型配合使用,哪些类型的操作可以对相应的数据类型执行。有两种数据类型:

Data type is a way to classify various types of data such as integer, string, etc. which determines the values that can be used with the corresponding type of data, the type of operations that can be performed on the corresponding type of data. There are two data types −

  1. Built-in Data Type

  2. Derived Data Type

Built-in Data Type

编程语言内置支持的数据类型称为内置数据类型。例如,大多数语言提供以下内置数据类型。

Those data types for which a language has built-in support are known as Built-in Data types. For example, most of the languages provide the following built-in data types.

  1. Integers

  2. Boolean (true, false)

  3. Floating (Decimal numbers)

  4. Character and Strings

Derived Data Type

那些实现无关的数据类型称为派生数据类型,因为它们可以用这样或那样的方式实现。这些数据类型通常是通过组合基本数据类型或内置数据类型和对它们的关联操作而构建的。例如 −

Those data types which are implementation independent as they can be implemented in one or the other way are known as derived data types. These data types are normally built by the combination of primary or built-in data types and associated operations on them. For example −

  1. List

  2. Array

  3. Stack

  4. Queue

Basic Operations

数据结构中的数据由某些操作处理。所选的具体数据结构很大程度上取决于需要在数据结构上执行的操作的频率。

The data in the data structures are processed by certain operations. The particular data structure chosen largely depends on the frequency of the operation that needs to be performed on the data structure.

  1. Traversing

  2. Searching

  3. Insertion

  4. Deletion

  5. Sorting

  6. Merging