From 4fa9d16e54dbfd9e90be786242afbbe6e2d0ede4 Mon Sep 17 00:00:00 2001 From: Liuchengray Date: Sun, 3 Nov 2024 12:55:38 +0100 Subject: [PATCH] add article --- 2024/Time-and-Space-Complexity/article.md | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 2024/Time-and-Space-Complexity/article.md diff --git a/2024/Time-and-Space-Complexity/article.md b/2024/Time-and-Space-Complexity/article.md new file mode 100644 index 00000000..26f47e2a --- /dev/null +++ b/2024/Time-and-Space-Complexity/article.md @@ -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 \ No newline at end of file