Skip to content

Commit

Permalink
add article
Browse files Browse the repository at this point in the history
  • Loading branch information
liuchengray committed Nov 3, 2024
1 parent d1a56ca commit 4fa9d16
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions 2024/Time-and-Space-Complexity/article.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Time and Space Complexity: The Soul of Algorithms

Imagine you’re 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.

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.


## Authors
- Chengrui Liu

0 comments on commit 4fa9d16

Please sign in to comment.