Understanding the Time Complexity of an Algorithm

preview_player
Показать описание
Algorithms: Understanding the Time Complexity of an Algorithm
Topics discussed:
1. A Recap of Priori vs. Posteriori Analysis.
2. CPU Computations and Main Memory Space.
3. The Time Complexity of an Algorithm.

Music:
Axol x Alex Skrindo - You [NCS Release]

#AlgorithmsByNeso #Algorithms #TimeComplexity
Рекомендации по теме
Комментарии
Автор

00:08 Understanding priori vs posterior analysis of time and space complexity
03:16 Understanding Priori Analysis for Algorithm Time Complexity
06:26 Time complexity is the estimation of total CPU computations required to execute an algorithm.
09:34 Analyzing the time complexity of a simple algorithm with frequency count method
12:32 Understanding time complexity of algorithm instructions
15:38 The frequency count of the instruction is n + 1.
18:24 The time complexity of the algorithm depends on the number of times certain instructions are executed.
21:10 Understanding time complexity of an algorithm
23:47 Time complexity of algorithm is Big O

diwanshsawlani
Автор

Thank you Neso Academy, for making our life easier.

TanvirAhmedOriginal
Автор

Thank you for sharing in depth knowledge 🙏

Think_First
Автор

Thanks you..this video has helped me...need more videos on DSA topic

subhamukherjee
Автор

Plz bring series of gate pyq year wise subject wise

akashtiwari
Автор

1.Priori vs. Posterior Analysis Recap:
Priori analysis estimates time and memory space before executing an algorithm.
Posterior analysis calculates them after execution.

2.CPU Computations and Main Memory Space:
CPU computations refer to tasks executed by the CPU (instructions).
Main memory space stores data and instructions for quick access during execution.

3.Time Complexity Estimation:
Use the frequency count method.
Calculate the sum of frequency counts for each instruction.
Example: sum = 0 (1 unit), for (i = 1; i <= n; i++) (n + 1 units), sum += a[i] (2n units), return sum (1 unit).

4.Overall Time Complexity:
Total frequency count: 4n + 4.
Dominant term: 4n.
Time complexity: Big O(n) (linear time).

eghanshith
Автор

so much AURA i'm feeling right now cant lie LOL. NESO are the best

yazidbessadet
Автор

Although in the end, the main answer we're looking for is O(n)... just wondering about the sum = sum + a[i] part. Isn't it supposed to be 1? Because it's a one liner... I'm thinking in terms if we assign values to variables, say .... int a = 0, j = 9; <-- This would still be 1 unit of time, right? Thanks :)

alfianabdulhalin
Автор

one thing i could say is just thanks
i think that is very small one

Ehvan
Автор

Sir can you pls bring a course on networking? Like the many topics covered in ccna networking exam pls. It will add a depth of knowledge tobus and prepare us for that exam 🙏

Gust
Автор

For increment what I'd the time complexity

Debe-
Автор

I don't understand why not O(4n+4)

TanvirAhmedOriginal
visit shbcf.ru