Calculating Time Complexity | Data Structures and Algorithms| GeeksforGeeks

Поділитися
Вставка
  • Опубліковано 7 лют 2025

КОМЕНТАРІ • 273

  • @michaelzumpano7318
    @michaelzumpano7318 4 роки тому +352

    Bravo, that was the clearest yet most complete 8 min intro to complexity on UA-cam. Hey, you found a good teaching algorithm - balance time and headspace efficiencies. Props.

  • @thembalamimsimango8993
    @thembalamimsimango8993 3 роки тому +131

    You explained ten times better than my lecturer did in just 8-minutes, thank you

  • @kevindsa57
    @kevindsa57 2 роки тому +60

    After 4 years of Engineering in Computer Science this was the best explanation of Time Complexity thank you !!

    • @I_am_FRANCO
      @I_am_FRANCO Рік тому

      engineering in cs 🤔

    • @emrahcansahinoglu2342
      @emrahcansahinoglu2342 4 місяці тому +3

      @@I_am_FRANCO In some countries like mine (Türkiye formerly Turkey) the major called Computer Engineering is identical to Computer Science in both curriculum and concept. However, we just took a couple of more courses (in my opinion) from Electrical and Electronics Engineering regarding to the Hardware. Even my degree is given as B.S. in Comp. Eng. I guess he may have a similar situation.

  • @W3Fi
    @W3Fi 2 роки тому +10

    Incredible, I find myself at a loss for words to adequately express the precision and clarity of the elucidation.

  • @stith_pragya
    @stith_pragya 10 місяців тому +1

    Thank You So Much for this wonderful video......................🙏🏻🙏🏻🙏🏻🙏🏻🙏🏻🙏🏻

  • @siddharthpal7452
    @siddharthpal7452 2 місяці тому

    I was struggling to calculate time complexity from a long time . As , I was not able to understand , I was rote memorizing a lot of things . Huge thanks to you for explaining this in such a simple way .

  • @meBZcookie
    @meBZcookie 4 роки тому +37

    6:04 Time Complexity for Sorts

  • @outsiderthevoid8780
    @outsiderthevoid8780 3 місяці тому

    this guy taught me more in 8 minutes than my professor did in 3 weeks love u bro❤

  • @WitchelsArtSchool
    @WitchelsArtSchool Рік тому +1

    best video explaining complexity. the complexity of complexity have been resolved here :D

  • @stephenmusau2394
    @stephenmusau2394 3 місяці тому

    The simplest yet most comprehensive explanation that I have come across. Well done sir!

  • @AV-mb8lv
    @AV-mb8lv 4 роки тому +29

    Explains O(1), O(n), O(n^2). Then says, "now let's look at the scale of diff. complexities O(1), O(log n), O(n), O(nlog n), O(n^2)"
    Wait, where are the missing bits?
    "Now you'll be able to calculate all time complexities of the algorithms"

    • @himanshukandwal8710
      @himanshukandwal8710 3 роки тому +1

      for(int i=0; i

    • @jqn8361
      @jqn8361 3 роки тому +1

      @@himanshukandwal8710 O(n), You're going through all the i elements of the list (this is repeated n times + 1 time, just before the for loop breaks), which is a function of n, and assigning them to an integer value, which takes constant time. Searching through the linked list also takes constant time. You're also printing each element, which also takes constant time. So you have T(n) = c1*(n+1) + c2 + c3 + c4 = O(n)

    • @biikaaa.6540
      @biikaaa.6540 3 роки тому

      @@himanshukandwal8710 O(n)

    • @harshitraj953
      @harshitraj953 3 роки тому

      @@himanshukandwal8710 hllo,, sir,,
      Don't act 😎Smart sir

  • @dassanghamitra
    @dassanghamitra 12 днів тому

    Best vdo on the topic .. crisp clear and to the point..

  • @meowrice
    @meowrice 3 роки тому +4

    thanks! i finally understand bigO notations! the last part also is a big bonus for me. thank you!

  • @twinkleshaw693
    @twinkleshaw693 Рік тому +1

    Best video ever watched ❤️

  • @bhaskarnarayan2109
    @bhaskarnarayan2109 3 роки тому +86

    You could also mention the complexities like O(logn), O(nlogn) etc. and the concepts of Master Theorem. It would be better.

  • @alekhyarao5431
    @alekhyarao5431 11 місяців тому +3

    Excellent explanation and easy to understand. Thank you!

  • @ObsessedMee
    @ObsessedMee 4 роки тому +8

    This is called clear concept 🙌✨

  • @laawuni
    @laawuni 3 роки тому +1

    Best so far. you saved me

  • @ankishgupta1517
    @ankishgupta1517 5 років тому +20

    Perfect explanation...plzz upload more videos on complexities... 👌

  • @meghaadikarinayake7067
    @meghaadikarinayake7067 Рік тому +2

    Thank you very much!!!!❤

  • @LilJollyJoker
    @LilJollyJoker Рік тому +1

    Thank You!

  • @LucusJanny
    @LucusJanny 2 роки тому +1

    It was the best video on UA-cam about Time complexity. Best wishes for you bro

  • @jerrybear5866
    @jerrybear5866 4 місяці тому

    Thank you , you saved me for exam today.

  • @mohammedghabyen721
    @mohammedghabyen721 4 роки тому +3

    Best explanation, thank u

  • @बिहारीभायजी
    @बिहारीभायजी 3 роки тому +5

    Simple and great content. I wonder how my prof taught

  • @jhonbhai8943
    @jhonbhai8943 3 роки тому +5

    I was too much Dived into his Teaching .That I heard someone sparking gas Stove lighter at 1:34😂

  • @swapnildadamode662
    @swapnildadamode662 4 роки тому +3

    Man! You're the best! This is what i need

  • @ohmegatech666
    @ohmegatech666 3 місяці тому

    Good video. Quick correction at 5:48, O(n^c) is not exponential, it's polynomial since the exponent is a constant, like O(n^2) or O(n^3). Exponential is when the variable itself is in the exponent like O(2^n)

  • @floki6939
    @floki6939 3 роки тому +1

    Precise illustration. Thank you

  • @srichandana5122
    @srichandana5122 3 роки тому +1

    very clear and understandable .... thank u for ur vedio

  • @aleksandrakja6792
    @aleksandrakja6792 11 місяців тому +7

    You explained this misery better than my teacher ever could

  • @AdeniranAbisolaAbiwax
    @AdeniranAbisolaAbiwax 2 роки тому

    This is the best explanation i have come across so far

  • @mahendrasahani9148
    @mahendrasahani9148 Рік тому

    thank you, very good teaching algorithms

  • @debsankarpal763
    @debsankarpal763 Рік тому

    Wonderful! Best explanation in 8 minutes

  • @ece547teamsioux5
    @ece547teamsioux5 4 роки тому +6

    Great efforts.
    Thank you:)
    Regards from USA

  • @msnraju97
    @msnraju97 2 роки тому

    Very good explanation, Learned in 10mins
    Indian Engineer's lives depend on GFG. without it IT industry will fall

  • @AhmedAli-kf2wg
    @AhmedAli-kf2wg 3 роки тому +7

    I really appreciate the way you teach us. Thanks a lot sir : >)

  • @DaBaSoftware
    @DaBaSoftware 3 роки тому +1

    Thank you for the resource!

  • @danialsiddiqi635
    @danialsiddiqi635 3 роки тому +1

    Thank you for this video.

  • @hashantha_lk
    @hashantha_lk Рік тому

    Thanks, that was the most enlightening explanation it to complexity after lot of confusing video explanations on YT. You are the best !

  • @anonymoustravelvidz
    @anonymoustravelvidz 3 роки тому +1

    thank you, very helpful video.

  • @aladdinalswaifi9655
    @aladdinalswaifi9655 3 роки тому +1

    Well done
    Very clever and clear explanation
    Many Thanks

  • @subbusharma3990
    @subbusharma3990 4 роки тому +2

    Thank you for this
    Regards from Russia

  • @pradeepsinghrajput07
    @pradeepsinghrajput07 3 роки тому +5

    Really to the point and efficient explanation. Kudos

  • @956zombie956
    @956zombie956 5 років тому +11

    The best !

  • @pomegranate8593
    @pomegranate8593 4 роки тому +2

    when u said welcome to video i felt rly welcomed thank u my friend! also very helpful video!

  • @josephbermudez9533
    @josephbermudez9533 4 роки тому +22

    for 4:10, it is O(2n).
    Not O(n)
    Great video, thanks!

    • @BigYous
      @BigYous 4 роки тому

      you drop the constants for big O

    • @resep1234
      @resep1234 4 роки тому

      @@BigYous but if you drop the constants it should still be n+n which is 2n

    • @arjunjain7773
      @arjunjain7773 4 роки тому

      You don't use constants for bigO I don't know why... It's stupid but that's just how it is

    • @ognimoddd
      @ognimoddd 4 роки тому +6

      @@arjunjain7773 No, it's not stupid. The constants don't affect it as input gets bigger so it is useless to keep

    • @shawmcinroy472
      @shawmcinroy472 4 роки тому +1

      lepke 2 is a constant...

  • @studentbengal4043
    @studentbengal4043 3 роки тому

    Best tutorial ever on this topic...
    Thanks

  • @shreyapandey1423
    @shreyapandey1423 Рік тому

    Best lecture 😊

  • @neerajmahapatra5239
    @neerajmahapatra5239 3 роки тому

    You are very clear and easy to understand. Thanks...😍😍😍😍

  • @atharva..deshmukh
    @atharva..deshmukh 4 роки тому +2

    Finally, I got something that I wanted!!

  • @manishjoshi4989
    @manishjoshi4989 4 роки тому +3

    one doubt in sequence time complexity you described
    c1 + c2 n + c3 n = BigO n time complexity ( doubt is after removing constant from equation why n + n is not 2n)

    • @firdousanjum7893
      @firdousanjum7893 3 роки тому +3

      2 is constant so remove it. It will now b o(n)

  • @sagarchawla4926
    @sagarchawla4926 3 роки тому +3

    Smooth ✨

  • @jamesstark4136
    @jamesstark4136 4 роки тому +10

    Thanks! this helped a lot for my CS 211 class.

  • @saphalvecham5539
    @saphalvecham5539 Рік тому

    Wonderfully put

  • @AbdurRahman-op8zn
    @AbdurRahman-op8zn Рік тому

    Excellent ! Thanks a lot.

  • @amrutapatil1417
    @amrutapatil1417 4 роки тому +3

    simple and sweet!

  • @yaro_05
    @yaro_05 Рік тому

    Very nice. Thanks

  • @infi-tech3808
    @infi-tech3808 Рік тому

    I believe there was a mistake on 4:23: The time complexity for this sequence of loops would be O(n) + O(n), which simplifies to O(2n) not 0(n)

    • @heycalvinnn
      @heycalvinnn Рік тому +1

      You remove the constant in this case the 2 in 2n so you would be left with O(n)

  • @seemarani2403
    @seemarani2403 2 роки тому

    Awesome explanation👌👌

  • @marjoriejetajobe512
    @marjoriejetajobe512 3 роки тому +1

    Thanks, I learned a lot!

  • @Tauhid214
    @Tauhid214 Рік тому +1

    I appreciate your work. How about the for loops: for(i=1, i

  • @dusmannalinwad
    @dusmannalinwad 2 роки тому

    short and great..!!

  • @mathwithmathu1755
    @mathwithmathu1755 2 роки тому

    Really superb and very useful. Very good explanation...

  • @lakshmibonala2813
    @lakshmibonala2813 3 роки тому +7

    How c1+c2n+c3n = O(n)?? Is it O(2n) by removing constants.

    • @Sanatani_kanya_
      @Sanatani_kanya_ 2 роки тому +4

      C1+n(C2+C3)

    • @notnemeziz
      @notnemeziz 4 місяці тому

      O(2n) and O(n) are the same thing....O here stands for order of...so 2n, 3n or any cn is an order of n ie O(n)

  • @matteooccello491
    @matteooccello491 3 роки тому +12

    Thanks for the video! It was clear and really practical :)

  • @akashp4863
    @akashp4863 2 роки тому +1

    Thanks man

  • @ritikarauthan3304
    @ritikarauthan3304 2 роки тому

    Amazing ❤❤❤❤❤❤❤❤

  • @GGanzolo
    @GGanzolo Рік тому

    Really good introduction of time complexity. Thank you!

  • @shouryaverma6313
    @shouryaverma6313 4 роки тому +1

    ohh finally I found what I wanted
    thanks a lot sir

  • @hinaafzal4348
    @hinaafzal4348 2 роки тому

    Such a good way of teaching
    Very well done 👍👍👍

  • @rahulmajumdar5525
    @rahulmajumdar5525 2 роки тому

    Thank you for the great explanation straight to the point.....

  • @JPN-bx3yd
    @JPN-bx3yd 4 роки тому +1

    This is a great explanation.

  • @Umerele1
    @Umerele1 Рік тому +9

    man no matter how much i focus i can't understand time complexity 😥

  • @padigapatinarmada9729
    @padigapatinarmada9729 4 роки тому

    Simply superb

  • @cschiud5571
    @cschiud5571 2 роки тому

    dog, the prof explained that in like one every week for 3-4 weeks and i just understood it better here after 8 minutes :D

  • @faizanyounas4799
    @faizanyounas4799 10 місяців тому

    kamal boss

  • @krishnavar7219
    @krishnavar7219 Рік тому

    great work

  • @johndavies729
    @johndavies729 3 роки тому +1

    Really well explained. Thank you!

  • @ilyas1569
    @ilyas1569 Рік тому

    I understand the topic, thanks :)

  • @martinnieva8484
    @martinnieva8484 2 роки тому +1

    This was a wonderful introduction! Thank you

  • @shreyankraia9762
    @shreyankraia9762 4 роки тому +2

    This video explains only O(1),O(n) and O(n^2)
    Don't waste your time if your looking for other time complexity

  • @MsAdeel66
    @MsAdeel66 3 роки тому +1

    i love u dude.

  • @farzamafifi2257
    @farzamafifi2257 4 роки тому +1

    Evaluate single-core performance for integer computation. Perform two experiments: with task bound
    to the APP core and separately to the PRO core. Observe if there is a difference in measurements.
    Propose an algorithm that is able to generate a complexity of integer computation observable and
    measurable. Perform at least 10 measurements for each experiment. Consider using parts of code for
    Dhrystone benchmark its is my task is any has source code for in c ++ cause have to run in vrel

  • @Reacher1998
    @Reacher1998 3 роки тому +1

    Helped a lot, great video 🔥

  • @ryanmckenna2047
    @ryanmckenna2047 3 роки тому

    Thanks that video was incredible...your incredible!

  • @amalkrishnas1696
    @amalkrishnas1696 2 роки тому

    Thanks for the video

  • @vijaydeepak5423
    @vijaydeepak5423 4 роки тому +1

    Good one

  • @sumantabanerjee9728
    @sumantabanerjee9728 Рік тому

    for(i=0; i

  • @DarkArcticTV
    @DarkArcticTV 3 роки тому +1

    u rock man

  • @JamesBrodski
    @JamesBrodski 3 роки тому +1

    Great video. Thank you so much! Very helpful

  • @AYESHAZAMURD-s4p
    @AYESHAZAMURD-s4p 3 місяці тому

    Sir what if in sequential statement the time take by each statement was n+n^2 + n^ 3 then what would be the total Time complexity...?

  • @neyso_dl9810
    @neyso_dl9810 2 місяці тому

    I knew that Indians where the best explainer

  • @kanishkaralasi7408
    @kanishkaralasi7408 2 роки тому +1

    Wonderful explanation! You're the best 💯

  • @divinegeorgeninan5822
    @divinegeorgeninan5822 2 роки тому

    Thank you❤

  • @hi-tk4hu
    @hi-tk4hu 3 роки тому +1

    very good explanation and easy for beginners to understand thank you❤️

  • @sheikhjabed3967
    @sheikhjabed3967 4 роки тому

    Very Helpful.Thanks a lot

  • @no_one4video
    @no_one4video 6 місяців тому

    good video

  • @subinkv6849
    @subinkv6849 Рік тому

    Thank you bro

  • @goksucanciftci9663
    @goksucanciftci9663 4 роки тому +1

    very nice