What are Algorithms ? Meaning of Time and Space Complexity of algorithms ?

What are Algorithms ? Meaning of Time and Space Complexity of algorithms ?

ยท

1 min read

What are Algorithms ?

  • Algorithms are step-by-step process or a set of rules designed to solve a specific problem or perform a particular task.

  • Algorithms provides a systematic approach to problem-solving by defining a sequence of instructions that, when executed, it produce the desired output or solve the problem efficiently.


Two essential concepts in algorithms that evaluate an algorithm's performance in multiple dimensions are time complexity and space complexity.

Space Complexity :

  • It is refers to the amount of memory or space required by an algorithm to solve a problem.

  • It measures the amount of additional memory used by the algorithms.

  • It helps in analyzing how efficiently an algorithm utilizes memory resources.

Time Complexity :

  • It is refers to the amount of time or number of operations required by an algorithm to solve a problem.

  • It measures the efficiency of an algorithm in terms of time it takes to execute as the input size increases.

  • It helps in understanding how the algorithm's execution time grows with respect to the input size.

ย