From a8a88f588d62a8d08d77229769c41d28f567e2a4 Mon Sep 17 00:00:00 2001 From: Mayada <115709272+Maddily@users.noreply.github.com> Date: Sun, 29 Sep 2024 15:43:10 +0300 Subject: [PATCH 1/2] Fix subject-verb agreement in introduction section --- javascript/computer_science/time_complexity.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/javascript/computer_science/time_complexity.md b/javascript/computer_science/time_complexity.md index 08d3d3fd3ab..8121d1c88b0 100644 --- a/javascript/computer_science/time_complexity.md +++ b/javascript/computer_science/time_complexity.md @@ -1,6 +1,6 @@ ### Introduction -You've written a lot of code up to this point, and you've hopefully moved on from just trying to write code that works, to now considering code readability and maintainability. You might spend some time considering how you can create the necessary abstractions so that your code stays easy to work with even as the requirements for it grows. +You've written a lot of code up to this point, and you've hopefully moved on from just trying to write code that works, to now considering code readability and maintainability. You might spend some time considering how you can create the necessary abstractions so that your code stays easy to work with even as the requirements for it grow. Code readability and maintainability are super important. After all, you will likely spend as much, if not more, time reading code than writing it. You need to make sure new features are integrated with ease. From cdba2b879394f4b91cef551b0eaff62f457c1dda Mon Sep 17 00:00:00 2001 From: Mayada <115709272+Maddily@users.noreply.github.com> Date: Sun, 29 Sep 2024 16:08:25 +0300 Subject: [PATCH 2/2] Escape asterisks --- javascript/computer_science/time_complexity.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/javascript/computer_science/time_complexity.md b/javascript/computer_science/time_complexity.md index 8121d1c88b0..897cddbbf9f 100644 --- a/javascript/computer_science/time_complexity.md +++ b/javascript/computer_science/time_complexity.md @@ -221,11 +221,11 @@ You want to avoid this if at all possible, otherwise you won't be processing muc #### O(N!) - Factorial complexity -A factorial is the product of the sequence of *n* integers. The factorial of 4(4!) is 4 * 3 * 2 * 1. +A factorial is the product of the sequence of *n* integers. The factorial of 4(4!) is 4 \* 3 \* 2 \* 1. You will come across Factorial Complexity if you ever need to calculate permutations or combinations. If you have an array and have to work out all the combinations you can make from the array, that is a Factorial complexity. It's manageable for a small number of items, but the leap with each new item in a dataset can be huge. -The factorial of 3 is 6 (3 * 2 * 1). The factorial of 4 is 24. The factorial of 10? 3,628,800. So you can see how quickly things can get out of hand. +The factorial of 3 is 6 (3 \* 2 \* 1). The factorial of 4 is 24. The factorial of 10? 3,628,800. So you can see how quickly things can get out of hand. ### Alternatives to Big O