二叉堆
二叉堆是一种完全二叉树,每个节点存有一个权值。
完全二叉树的定义:
完全二叉树只允许最后一行不为满
且最后一行必须从左往右排序
最后一行元素之间不可以有间隔
注意:二叉堆不是二叉搜索树,并不满足左节点小于右节点
二叉堆是一种完全二叉树,每个节点存有一个权值。
完全二叉树的定义:
完全二叉树只允许最后一行不为满
且最后一行必须从左往右排序
最后一行元素之间不可以有间隔
注意:二叉堆不是二叉搜索树,并不满足左节点小于右节点
Hash Table: A abstract data structure that maps keys and values.
Hash Function: A hash function is any function that can be used to map data of arbitrary size to fixed-size values (used for storage address), namely Hash(keys)=Address
Graph: A graph G is an ordered pair of a set V of vertices and a set E of edges.
G=(V,E)
For the summer camp of Shanghai Jiao Tong University, I decided to learn data structure to prepare for the oncoming exam.
From 2024/06/20 to 2024/06/22, I spent three days to learn it simply, and challenge myself to learn it in English. Surprsingly, I did it!
My learning source is the class from bilibili. 9 hours of lesson can get started in the data structure quickly. It's enough for exam (maybe). Because of I major in the transportation equipment, the data structure is not my major lesson. So I don't know how difficult the exam is. But I think, for some simple application, I can use suitable data structure to achieve something at least.
For normal arrays, the data in the memory is stored jointly. But if we need modify some data or extend the arrays, it is hard. Linked list leverages the fixed data sequence, link disjoint data by Link. There are two parts in each data block, including data itself, and a pointer, which declared who is the next data block.