Skip to content

Commit 86d46df

Browse files
committed
Merge pull request braydie#86 from mmarica/patch-1
Fixed typo and added comma for improved readability
2 parents 054e002 + 15b6880 commit 86d46df

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

en/2-Intermediate/Personal-Skills/03-How to Tradeoff Time vs Space.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ In designing or understanding an algorithm, the amount of time it takes to run i
66

77
To me, computational complexity theory is beautiful and as profound as physics - and a little bit goes a long way!
88

9-
Time (processor cycles) and space (memory) can be traded off against each other. Engineering is about compromise, and this is a fine example. It is not always systematic. In general, however, one can save space by encoding things more tightly, at the expense of more computation time when you have to decode them. You can save time by caching, that is, spending space to store a local copy of something, at the expense of having to maintain the consistency of the cache. You can sometimes save time by maintaining more information in a data structure. This usually cost a small amount of space but may complicate the algorithm.
9+
Time (processor cycles) and space (memory) can be traded off against each other. Engineering is about compromise, and this is a fine example. It is not always systematic. In general, however, one can save space by encoding things more tightly, at the expense of more computation time when you have to decode them. You can save time by caching, that is, spending space to store a local copy of something, at the expense of having to maintain the consistency of the cache. You can sometimes save time by maintaining more information in a data structure. This usually costs a small amount of space, but may complicate the algorithm.
1010

1111
Improving the space/time trade-off can often change one or the other dramatically. However, before you work on this you should ask yourself if what you are improving is really the thing that needs the most improvement. It's fun to work on an algorithm, but you can't let that blind you to the cold hard fact that improving something that is not a problem will not make any noticeable difference and will create a test burden.
1212

0 commit comments

Comments
 (0)