Fixed Typo for DSA Roadmap (#5962)

Added content links and fixed link syntax error.
---------

Co-authored-by: dsh <daniel.s.holdsworth@gmail.com>
pull/5969/head
Nikhil 5 months ago committed by GitHub
parent 2874eb0a42
commit c9d6b36b34
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 2
      src/data/roadmaps/datastructures-and-algorithms/content/103-basic-data-structures/103-queues.md
  2. 6
      src/data/roadmaps/datastructures-and-algorithms/content/104-algorithmic-complexity/100-time-vs-space.md
  3. 3
      src/data/roadmaps/datastructures-and-algorithms/content/104-algorithmic-complexity/101-calculating.md
  4. 7
      src/data/roadmaps/datastructures-and-algorithms/content/104-algorithmic-complexity/103-asymptotic-notation/100-big-o.md

@ -5,4 +5,4 @@ Queues are a type of data structure in which elements are held in a sequence and
Learn more from the following links:
- [@video@Queue](https://www.youtube.com/watch?v=GYptUgnIM_I)
- [@video@Python Queue](https://www.youtube.com/watch?v=rUUrmGKYwHw
- [@video@Python Queue](https://www.youtube.com/watch?v=rUUrmGKYwHw)

@ -1,3 +1,7 @@
# Time vs Space Complexity
In the context of algorithmic complexity, "time" refers to the amount of computational time that the algorithm takes to execute, while "space" refers to the amount of memory that the algorithm needs to complete its operation. The time complexity of an algorithm quantifies the amount of time taken by an algorithm to run, as a function of the size of the input to the program. The space complexity of an algorithm quantifies the amount of space or memory taken by an algorithm to run, as a function of the size of the input to the program. It's important to note that time and space are often at odds with each other; optimizing an algorithm to be quicker often requires taking up more memory, and decreasing memory usage can often make the algorithm slower. This is known as the space-time tradeoff.
In the context of algorithmic complexity, "time" refers to the amount of computational time that the algorithm takes to execute, while "space" refers to the amount of memory that the algorithm needs to complete its operation. The time complexity of an algorithm quantifies the amount of time taken by an algorithm to run, as a function of the size of the input to the program. The space complexity of an algorithm quantifies the amount of space or memory taken by an algorithm to run, as a function of the size of the input to the program. It's important to note that time and space are often at odds with each other; optimizing an algorithm to be quicker often requires taking up more memory, and decreasing memory usage can often make the algorithm slower. This is known as the space-time tradeoff.
Learn more from the following resources:
- [@article@Cheat Sheet](https://www.bigocheatsheet.com/)

@ -2,4 +2,7 @@
The process of calculating algorithmic complexity, often referred to as Big O notation, involves counting the operations or steps an algorithm takes in function of the size of its input. The aim is to identify the worst-case, average-case, and best-case complexity. Generally, the main focus is on the worst-case scenario which represents the maximum number of steps taken by an algorithm. To calculate it, you consider the highest order of size (n) in your algorithm's steps. For instance, if an algorithm performs a loop 5 times for 'n' items, and then does 3 unrelated steps, it has a complexity of O(n), because the linear steps grow faster than constant ones as n increases. Other complexities include O(1) for constant complexity, O(n) for linear complexity, O(n^2) for quadratic complexity, and so on, based on how the steps increase with size.
Learn more from the following resources:
- [@video@Time & Space Complexity](https://www.youtube.com/watch?v=Z0bH0cMY0E8)
- [@video@How Write and Analyze Algorithm](https://www.youtube.com/watch?v=xGYsEqe9Vl0)

@ -1,3 +1,8 @@
# Big O Notation
"Big O" notation, officially known as O-notation, is used in computer science to describe the performance or complexity of an algorithm. Specifically, it provides an upper bound on the time complexity, describing the worst-case scenario. Thus, it gives an upper limit on the time taken for an algorithm to complete based on the size of the input. The notation is expressed as O(f(n)), where f(n) is a function that measures the largest count of steps that an algorithm could possibly take to solve a problem of size n. For instance, O(n) denotes a linear relationship between the time taken and the input size, while O(1) signifies constant time complexity, i.e., the time taken is independent of input size. Remember, Big O notation is only an approximation meant to describe the scaling of the algorithm and not the exact time taken.
"Big O" notation, officially known as O-notation, is used in computer science to describe the performance or complexity of an algorithm. Specifically, it provides an upper bound on the time complexity, describing the worst-case scenario. Thus, it gives an upper limit on the time taken for an algorithm to complete based on the size of the input. The notation is expressed as O(f(n)), where f(n) is a function that measures the largest count of steps that an algorithm could possibly take to solve a problem of size n. For instance, O(n) denotes a linear relationship between the time taken and the input size, while O(1) signifies constant time complexity, i.e., the time taken is independent of input size. Remember, Big O notation is only an approximation meant to describe the scaling of the algorithm and not the exact time taken.
Learn more from the following links:
- [@video@Introduction to Big O Notation and Time Complexity](https://www.youtube.com/watch?v=D6xkbGLQesk)
- [@video@Big-O Notation](https://www.youtube.com/watch?v=BgLTDT03QtU)

Loading…
Cancel
Save