Space Complexity of Algorithms - How to Calculate Space Complexity of Algorithms in Data Structures

Описание к видео Space Complexity of Algorithms - How to Calculate Space Complexity of Algorithms in Data Structures

Support Simple Snippets by Donations -
Google Pay UPI ID - tanmaysakpal11@okicici
PayPal - paypal.me/tanmaysakpal11
--------------------------------------------------------------------------------------------- Understand the concept of Space complexity of algorithms and how to calculate space complexity.
Definition: The space complexity of an algorithm or a computer program is the amount of memory space required to solve an instance of the computational problem as a function of the size of the input.
Simple words : It is the memory required by an algorithm to execute a program and produce output.
Similar to time complexity, Space complexity is often expressed asymptotically in big O notation, such as O(n), O(nlog(n)), O(n^2) etc., where n is the input size in units of bits needed to represent the input.
For any algorithm, memory is required for the following purposes -
1) To store program instructions.
2) To store constant values.
3) To store variable values.
4) And for few other things like function calls, jumping statements etc.
Auxiliary Space : is the temporary space (excluding the input size) allocated by your algorithm to solve the problem, with respect to input size.
Space complexity includes both Auxiliary space and space used by input.
Space Complexity = Input Size + Auxiliary space.

Full DSA playlist -    • Introduction to Data Structures & Alg...  
C++ Programming Tutorials for Beginners Course -    • Introduction to Computer Programming ...  

Simple Snippets Official Website -
http://simplesnippets.tech/
Simple Snippets on Facebook -
  / simplesnippets  
Simple Snippets on Instagram -
  / simplesnippets  
Simple Snippets on Twitter -
  / simplesnippet  
Simple Snippets Google Plus Page -
https://plus.google.com/+SimpleSnippets
Simple Snippets email ID -
[email protected]

For More Technology News, Latest Updates and Blog articles visit our Official Website - http://simplesnippets.tech/
#bigonotation #algorithmanalysis #spacecomplexity #bigO

Комментарии

Информация по комментариям в разработке