Data structure - a self-study notes

Foreword

Mentioned data structures, they think of the program = data structure + algorithm of the equation, because the entry-regarded multi-disciplinary, so while learning java programming languages, you want more than the next point effort basis. Some see the Internet predecessors emotion, differences formal academic training and technical education, even if some unexamined, but four monasteries, may not be stronger than those basic, but very hard, non-Coban colleagues, learning to get started faster. So firmer own computer based learning, to lay the foundation behind the study believe it will be more easy to use. This data structure is the first book borrowed a version of the C language data structures, software engineering borrowed from a friend. Back in line to see the teacher's recommendation Cheng Jie lying data structure, now read about two hundred pages, blog would like to record their own study notes.

Data structure represents the physical structure of the data referred to, also known as the storage structure in a computer.
Abstract data types and data type; data type is used to characterize program operating characteristics of the object, abstract data types, and means a mathematical model defining a set of operations on the model; can be subdivided into three types, namely, type atomic fixed aggregation type, aggregation type variable.


The following format defining abstract data types
ADT {abstract data type name
data object :( definition data object)
data relationships :( relationship definition data)
Basic operation :( defined basic operations)
} ADT abstract data type name

Basics concept

  • Algorithm: a description of the steps to solve a specific problem, which is a finite sequence of instructions, where each instruction represents one or more operations; there is a finite, certainty, feasibility, input and output. ,
  • Data: the symbol is described objective things, the object is computer operated, a computer can be identified, and input to the set of symbols processed by a computer.
  • Element: is composed of data, the basic unit of some significance, as a whole is usually treated, also referred recorded in the computer.
  • Data items: a data element may consist of a number of data items.
  • Data objects: is a collection of data elements of the same nature, is a subset of the data.
  • Data structures: is the presence of one or more data elements of the particular relationship between each other set.
  • Logical structure: it is the relationship between the target data elements.
  • Storage structure: refers to a logical structure of data stored in the computer means.
  • Abstract data types: a mathematical model and a set of operations defined in the model.
  • N is a finite set of binary tree nodes, or the set is an empty set, or a root and two disjoint binary tree, the root node are called a left subtree and right subtree composition.
  • Binary tree characteristics and properties:
  1. Each node has at most two subtrees
  2. Left subtree and right subtree is in order, the order can not be reversed any
  3. Even if the tree is only a sub-tree nodes, but also distinguish it from the left or right subtree subtree.
  • Special binary tree
    • Oblique tree
    • Full Binary Tree
    • Complete binary tree: a leaf node can only appear in the lower layers, the lowermost leaves a certain concentration at successive positions of the left portion, if the inverse of the leaf nodes of the second layer, must be in the right position of the continuous portion, the same number of nodes of the binary tree , complete binary tree of depth to a minimum.
  • Tree storage structure:
    Father notation: data parent
    child notation: data child
    child Brothers notation: data firstchild (target domain, a first child node of the node storing the storage address) rightsib (pointer field storing the storing the address of the right sibling node)

https://www.jianshu.com/u/808054b533e9

Guess you like

Origin www.cnblogs.com/yhycoder/p/11939600.html
Recommended