Skip to content

Latest commit

 

History

History
67 lines (50 loc) · 1.77 KB

File metadata and controls

67 lines (50 loc) · 1.77 KB

Day 1

  • 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
    1. Omega Notation for best case
    2. Theta Notation for average case
    3. 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

Day 2 (2025-11-28)

Data Structure

  • There are two types of data structure
  1. Linear data structure (Array, Linked List, Stack , Queue)
  2. 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

  1. Linear equation: y=mx+c
  2. Quadratic equation: ax^2 + bx + c
  3. Cubic equation: ax^3 + bx^2 + cx + d
  4. Bi-Quadratic equation: ax^4 + bx^3 + cx^2 + dx + e
  5. Logarithmetic equation: alogx+b
  6. Exponential equation: e^x + 2^3 + 3^x

In Linear equation

  • 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 ) _

In Quadratic equation

  • 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

In Cubic equation

  • 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