mirror of
				https://github.com/krahets/hello-algo.git
				synced 2025-11-04 14:18:20 +08:00 
			
		
		
		
	Update site description.
This commit is contained in:
		@ -6,7 +6,9 @@ comments: true
 | 
			
		||||
 | 
			
		||||
理想情况下,我们希望算法的时间复杂度和空间复杂度都能够达到最优,而实际上,同时优化时间复杂度和空间复杂度是非常困难的。
 | 
			
		||||
 | 
			
		||||
**降低时间复杂度,往往是以提升空间复杂度为代价的,反之亦然。** 我们把牺牲内存空间来提升算法运行速度的思路称为「以空间换时间」;反之,称之为「以时间换空间」。选择哪种思路取决于我们更看重哪个方面。大多数情况下,内存空间不会成为算法瓶颈,因此以空间换时间更加常用。
 | 
			
		||||
**降低时间复杂度,往往是以提升空间复杂度为代价的,反之亦然。** 我们把牺牲内存空间来提升算法运行速度的思路称为「以空间换时间」;反之,称之为「以时间换空间」。选择哪种思路取决于我们更看重哪个方面。
 | 
			
		||||
 | 
			
		||||
大多数情况下,时间都是比空间更宝贵的,只要空间复杂度不要太离谱、能接受就行,**因此以空间换时间最为常用**。
 | 
			
		||||
 | 
			
		||||
## 示例题目 *
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -643,7 +643,7 @@ AVL 树的独特之处在于「旋转 Rotation」的操作,其可 **在不影
 | 
			
		||||
 | 
			
		||||
## AVL 树典型应用
 | 
			
		||||
 | 
			
		||||
- 组织存储大型数据,适用于高频查找、低频增删场景
 | 
			
		||||
- 组织存储大型数据,适用于高频查找、低频增删场景;
 | 
			
		||||
- 用于建立数据库中的索引系统;
 | 
			
		||||
 | 
			
		||||
!!! question "为什么红黑树比 AVL 树更受欢迎?"
 | 
			
		||||
 | 
			
		||||
@ -2,14 +2,14 @@
 | 
			
		||||
site_name: Hello 算法
 | 
			
		||||
site_url: https://www.hello-algo.com/
 | 
			
		||||
site_author: Krahets
 | 
			
		||||
site_description: Your first book to learn Data Structure And Algorithm.
 | 
			
		||||
site_description: 一本动画图解、能运行、可提问的数据结构与算法入门书
 | 
			
		||||
# Repository
 | 
			
		||||
repo_name: krahets/hello-algo
 | 
			
		||||
repo_url: https://github.com/krahets/hello-algo
 | 
			
		||||
edit_uri: https://github.com/krahets/hello-algo/tree/master/docs/
 | 
			
		||||
 | 
			
		||||
# Copyright
 | 
			
		||||
copyright: Copyright © 2020 - 2022 Krahets
 | 
			
		||||
copyright: Copyright © 2022 Krahets
 | 
			
		||||
 | 
			
		||||
# Configuration
 | 
			
		||||
theme:
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user