What is complexity?🤔🤔And how to determine it for any algorithm? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

What is complexity?🤔🤔And how to determine it for any algorithm?

define all things related complexity

20th Dec 2017, 5:08 AM
vikrant singh
vikrant singh - avatar
1 Answer
+ 7
The number of (machine) instructions which a program executes during its running time is called its time complexity in computer science. This number depends primarily on the size of the program's input, that is approximately on the number of the strings to be sorted (and their length) and the algorithm used. it's of 2 types time & space complexity time complexity :-The number of (machine) instructions which a program executes during its running time is called its time complexity in computer science space complexity :- This is essentially the number of memory cells which an algorithm needs. A good algorithm keeps this number as small as possible, too.
20th Dec 2017, 5:21 AM
GAWEN STEASY
GAWEN STEASY - avatar