Update space_time_tradeoff.md
This commit is contained in:
parent
9e24a79096
commit
4d021775c3
@ -2,7 +2,7 @@
|
|||||||
comments: true
|
comments: true
|
||||||
---
|
---
|
||||||
|
|
||||||
# 权衡时间与空间 *
|
# 权衡时间与空间
|
||||||
|
|
||||||
理想情况下,我们希望算法的时间复杂度和空间复杂度都能够达到最优,而实际上,同时优化时间复杂度和空间复杂度是非常困难的。
|
理想情况下,我们希望算法的时间复杂度和空间复杂度都能够达到最优,而实际上,同时优化时间复杂度和空间复杂度是非常困难的。
|
||||||
|
|
||||||
@ -10,7 +10,7 @@ comments: true
|
|||||||
|
|
||||||
大多数情况下,时间都是比空间更宝贵的,只要空间复杂度不要太离谱、能接受就行,**因此以空间换时间最为常用**。
|
大多数情况下,时间都是比空间更宝贵的,只要空间复杂度不要太离谱、能接受就行,**因此以空间换时间最为常用**。
|
||||||
|
|
||||||
## 示例题目
|
## 示例题目 *
|
||||||
|
|
||||||
以 LeetCode 全站第一题 [两数之和](https://leetcode.cn/problems/two-sum/) 为例。
|
以 LeetCode 全站第一题 [两数之和](https://leetcode.cn/problems/two-sum/) 为例。
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user