Understanding the Time Complexity of an Algorithm

Поделиться
HTML-код
  • Опубликовано: 28 дек 2024

Комментарии • 30

  • @nesoacademy
    @nesoacademy  2 месяца назад +2

    Algorithms Playlist: ruclips.net/p/PLBlnK6fEyqRhoF3cPp0mgOZPuXeu84nAd

  • @diwanshsawlani7028
    @diwanshsawlani7028 3 месяца назад +11

    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

  • @Dr_Larken
    @Dr_Larken 4 месяца назад +45

    The algorithm brought me here!

  • @TanvirAhmedOriginal
    @TanvirAhmedOriginal 4 месяца назад +9

    Thank you Neso Academy, for making our life easier.

  • @subhamukherjee7442
    @subhamukherjee7442 Месяц назад +2

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

  • @Think_First12
    @Think_First12 4 месяца назад +4

    Thank you for sharing in depth knowledge 🙏

  • @irappapatil8621
    @irappapatil8621 2 месяца назад +1

    Clear pronunciation.Good video.

  • @yazidbessadet
    @yazidbessadet 4 месяца назад +2

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

  • @salsalazar7646
    @salsalazar7646 3 месяца назад

    nice video well done amazing job

  • @akashtiwari397
    @akashtiwari397 4 месяца назад +6

    Plz bring series of gate pyq year wise subject wise

  • @sujitsingh5862
    @sujitsingh5862 4 месяца назад +2

    better than previous

  • @eghanshith5346
    @eghanshith5346 3 месяца назад +2

    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

  • @MuhammadAli-gh4do
    @MuhammadAli-gh4do 3 месяца назад

    very helpful

  • @alfianabdulhalin1873
    @alfianabdulhalin1873 2 месяца назад +1

    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;

    • @subhamukherjee7442
      @subhamukherjee7442 Месяц назад

      NOt really because it involves two operations, addition(1 task) and assigning value(1 task)...this continues till n times

  • @Ehvan1729
    @Ehvan1729 3 месяца назад +2

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

  • @u.aamir1
    @u.aamir1 Месяц назад

    any slides or notes available?

  • @De1be1-00
    @De1be1-00 4 месяца назад +1

    For increment what I'd the time complexity

  • @AshvinParmar-ov2dv
    @AshvinParmar-ov2dv 3 месяца назад +1

    2 minute video took my 24 minutes

    • @AbdullahBRashid
      @AbdullahBRashid 3 месяца назад

      Fr. Dogshit video. Absolutely zero info on how to calculate more complex algorithms. Not worth 24 mins

  • @Gust52
    @Gust52 4 месяца назад +2

    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 🙏

  • @mohamad.d1258
    @mohamad.d1258 4 месяца назад +2

    Well that's my problem.

  • @TanvirAhmedOriginal
    @TanvirAhmedOriginal 4 месяца назад +2

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

    • @shahidiqbal512
      @shahidiqbal512 4 месяца назад

      I also asking same question.

    • @nicolasbarone2176
      @nicolasbarone2176 3 месяца назад +3

      Big O notation represents the sets of functions, which have to be above the original function, by a given constant c and a given value n0.
      In mathematical way: O(g(n)) = { f(n) | Exist two costant c > 0 and n0 > 0 : 0 = 4n + 1 by a given n0. For example if n0 = 20, the inequality will be: c * 20 >= 4 * 20 + 1; so, to make this inequality true, we can use c = 5. You can use any number that you want for the demonstration.
      If you were questioning if you could just write O(4n + 4) the answer is yes! But it's not as formal as writing O(n).
      I hope that is helpful :)

    • @TanvirAhmedOriginal
      @TanvirAhmedOriginal 3 месяца назад

      @@nicolasbarone2176 thanks

  • @enough200
    @enough200 2 месяца назад

    how 4n+4 became O(n)?

    • @muskanas78
      @muskanas78 2 месяца назад

      constants are ignored

  • @footworld2335
    @footworld2335 4 месяца назад +1

    wow