mirror of
				https://github.com/krahets/hello-algo.git
				synced 2025-11-04 14:18:20 +08:00 
			
		
		
		
	Update the book based on the revised second edition (#1014)
* Revised the book * Update the book with the second revised edition * Revise base on the manuscript of the first edition
This commit is contained in:
		@ -11,7 +11,7 @@ The design of a linked list allows its nodes to be scattered throughout memory,
 | 
			
		||||
Observing the image above, the fundamental unit of a linked list is the "node" object. Each node contains two pieces of data: the "value" of the node and the "reference" to the next node.
 | 
			
		||||
 | 
			
		||||
- The first node of a linked list is known as the "head node", and the last one is called the "tail node".
 | 
			
		||||
- The tail node points to "null", which is represented as $\text{null}$ in Java, $\text{nullptr}$ in C++, and $\text{None}$ in Python.
 | 
			
		||||
- The tail node points to "null", which is represented as `null` in Java, `nullptr` in C++, and `None` in Python.
 | 
			
		||||
- In languages that support pointers, like C, C++, Go, and Rust, the aforementioned "reference" should be replaced with a "pointer".
 | 
			
		||||
 | 
			
		||||
As shown in the following code, a linked list node `ListNode`, apart from containing a value, also needs to store a reference (pointer). Therefore, **a linked list consumes more memory space than an array for the same amount of data**.
 | 
			
		||||
 | 
			
		||||
@ -10,7 +10,7 @@
 | 
			
		||||
- Proper nouns and words and phrases with specific meanings are marked with `"double quotes"` to avoid ambiguity.
 | 
			
		||||
- Important proper nouns and their English translations are marked with `" "` in parentheses, e.g. `"array array"` . It is recommended to memorize them for reading the literature.
 | 
			
		||||
- **Bolded text** Indicates key content or summary statements, which deserve special attention.
 | 
			
		||||
- When it comes to terms that are inconsistent between programming languages, this book follows Python, for example using $\text{None}$ to mean "empty".
 | 
			
		||||
- When it comes to terms that are inconsistent between programming languages, this book follows Python, for example using `None` to mean "empty".
 | 
			
		||||
- This book partially abandons the specification of annotations in programming languages in exchange for a more compact layout of the content. There are three main types of annotations: title annotations, content annotations, and multi-line annotations.
 | 
			
		||||
 | 
			
		||||
=== "Python"
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user