-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c5969ca
commit 3058cb4
Showing
1 changed file
with
6 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,10 @@ | ||
# Time and Space Complexity: The Soul of Algorithms | ||
# Time and Space Complexity: The Soul of Algorithms | ||
|
||
Imagine you are at a restaurant trying to decide what to order. Flipping through the entire menu might take a while, but if you ask the waiter for a quick recommendation, you can make your decision much faster. In computer science, this method of seeking efficiency in algorithm is known as reducing "time complexity", which means minimizing the numbers of steps needed to find a solution. | ||
Imagine you are at a restaurant trying to decide what to order. Flipping through the entire menu might take a while, but if you ask the waiter for a quick recommendation, you can make your decision much faster. In computer science, this method of seeking efficiency in algorithm is known as reducing "time complexity", which means minimizing the numbers of steps needed to find a solution. | ||
|
||
Now, consider how much easier it would be if the menu assigned numbers to each dish. This way, you only need to remember a few digits instead of the names of all the dishes. Similarly, in computer science, saving storage space is equally important when designing algorithms. Reducing "space complexity" is a necessary task for any quality algorithm. | ||
Now, consider how much easier it would be if the menu assigned numbers to each dish. This way, you only need to remember a few digits instead of the names of all the dishes. Similarly, in computer science, saving storage space is equally important when designing algorithms. Reducing "space complexity" is a necessary task for any quality algorithm. | ||
|
||
Both time and space complexity are essential factors to consider when designing algorithms. Beyond just solving a problem, the ability to run efficiently is a vital requirement for any algorithm. | ||
Both time and space complexity are essential factors to consider when designing algorithms. Beyond just solving a problem, the ability to run efficiently is a vital requirement for any algorithm. | ||
|
||
|
||
## Author | ||
Chengrui Liu | ||
## Author | ||
Chengrui Liu |