- Learn about DSA why DSA is necessary.
- Learn about time complexity and space complexity
- Learn about:
Best Case , Average Case , Worst Case
- And the Notations to denote these cases
- Omega Notation for best case
- Theta Notation for average case
- Big-O Notation for worst case
Learned about why 2 lines of code is better than 100 lines of code
Learned about why 100 lines of code is better than 2 lines of code
- There are two types of data structure
- Linear data structure (Array, Linked List, Stack , Queue)
- Non-Linear data structure (Tree, Graph)
_ Analysis Of Algorithm _
- Best case (Omega Notation)
- Average case (Theta Notation)
- Worst case (Big-O Notation)
Rate Of Growth
- Linear equation: y=mx+c
- Quadratic equation: ax^2 + bx + c
- Cubic equation: ax^3 + bx^2 + cx + d
- Bi-Quadratic equation: ax^4 + bx^3 + cx^2 + dx + e
- Logarithmetic equation: alogx+b
- Exponential equation: e^x + 2^3 + 3^x
- an+b is nearly equal to n
- assume f(n) = 3n + 5
- f(1) = 3*1 + 5 = 8
- f(10) = 3*10 + 5 = 35
- f(100) = 3*100 + 5 = 305 ........ ........ ........ ........
- f(10000) = 3*10000 + 5 = 30005
- 30005 is nearly equal to 30000
_ (an + b) is nearly equal to n (because b is almost neglisible ) _
- assume f(n) = 3n^2 + 3n - 5
- In this we will only see the highest value or highest factor or most dominating factor which is n^2
- In worst case it takes n^2 time which is good for other factor
- assume f(n) = ax^3 + bx^2 + cx + d
- In this we will only see the highest value or highest factor or most dominating factor which is n^3
- In worst case it takes n^3 time which is good for other factor