Time and Space Complexity - Strivers A2Z DSA Course

Sdílet
Vložit
  • čas přidán 30. 12. 2022
  • Full Course: takeuforward.org/strivers-a2z...
    Notes: takeuforward.org/time-complex...
    In case you are thinking to buy courses, please check below:
    Link to get 20% additional Discount at Coding Ninjas: bit.ly/3wE5aHx
    Code "takeuforward" for 15% off at GFG: practice.geeksforgeeks.org/co...
    Code "takeuforward" for 20% off on sys-design: get.interviewready.io/?_aff=t...
    You can follow me across social media, all my handles are below:
    Linkedin/Instagram/Telegram: linktr.ee/takeUforward

Komentáře • 2,4K

  • @takeUforward
    @takeUforward  Před rokem +316

    Let's march ahead, and create an unmatchable DSA course! ❤️
    Happy new year everyone, wish you loads of success in your life :)

    • @job1cr0re.
      @job1cr0re. Před rokem +1

      thank you sir giving everyone this magnetic course ,solute to you 🥰🥰

    • @sukhpreetsingh5200
      @sukhpreetsingh5200 Před rokem +1

      happy new year and thanks for this amazing content.

    • @irfansari_
      @irfansari_ Před rokem

      Hey Striver, First of all Happy New Year
      I want to say if possible please try to make 2 videos of DSA in one week.
      If possible
      Thank you for this course

    • @simransimran6766
      @simransimran6766 Před rokem

      Happy new year 😍

    • @jiyabhagat6510
      @jiyabhagat6510 Před rokem

      Happiest New Year Striver!!
      I eagerly wanted to contribute to python codes for TUF articles.
      I even sent a testimony by writing a sample code on takeuforward111 but have not heard back yet. Do consider it!

  • @VishalGupta-xw2rp
    @VishalGupta-xw2rp Před rokem +254

    00:00 Introduction
    01:05 What is Time Complexity ?
    02:22 Why TC != Time Taken ?
    04:30 Example
    06:10 Big O Notation
    07:05 Example
    08:22 3 Rules of Time Complexity
    10:52 Best, Average, Worst Case
    11:10 Example
    13:30 Why do we compute in terms of Worst Case
    14:15 Avoid Constants
    16:24 Avoid Lower Values
    17:40 Big Oh, Theta, Omega
    18:28 Disclaimer
    19:28 Question 1
    22:50 Question 2
    25:57 Space Complexity
    26:50 What is Space Complexity
    27:40 Example
    30:30 Never change the Input
    32:16 Number of Operations
    34:10 Next Video
    You are doing soo much for us. Even after getting into your dream company you still working hard to help us fulfill our dreams. I don't know whether you will see my message or not but it's such a great time to be alive when we are getting to see Striver. Thankyou soo much. I wish i will get to see you one day.
    #StriversA2ZDSA
    *Understood* ♥️🔥

    • @inf3rno464
      @inf3rno464 Před 6 měsíci +2

      Where can I get 0:06 that DSA Sheet of Striver's ? Link ? Or site's name ?

  • @techtalksnow01
    @techtalksnow01 Před rokem +99

    Time Complexity is Rate at which the time taken increases with respect to input size.
    Time Complexity is calculated in BigO notation.
    3 rules for calculating TC:
    Calculate with worst case scenario.
    Avoid Constants
    Avoid Lower Values
    BigO-worst scenario
    Theta-average case scenario
    Omega- Best Case Scenario
    Space Complexity:
    SC is also calculated in BigO notation itself
    There are two spaces.
    1.Auxilalry Space:The space taken to solve problem and store solution.
    2.Input Space:The space taken to store the inputs.
    C=a+b
    Where C is auxillary Space.
    a and b are input space.
    While coding, tampering the input for SC is wrong practice.

    • @aanishas1925
      @aanishas1925 Před 7 měsíci +8

      input space is space taken to store the input

    • @techtalksnow01
      @techtalksnow01 Před 9 dny

      @@aanishas1925 Edited and thanks

  • @serrioton1858
    @serrioton1858 Před 14 dny +24

    I have started the A2Z DSA Sheet on 16th May 2024. Will comeback here every 16th day of the month to update my progress.

  • @user-jv4mp8yc7v
    @user-jv4mp8yc7v Před 5 měsíci +73

    Today I am getting started with the playlist.
    I have 12+ exp already and now learning DSA to enter into my dream company.
    I regret the wasted years but I hope I am not too old to start now.
    All the best to everyone❤

    • @Rahulsingh-mq2ny
      @Rahulsingh-mq2ny Před 5 měsíci +1

      it's never too late ;) best of luck!

    • @kumarshreyas7899
      @kumarshreyas7899 Před 3 měsíci

      All the best sir /madam

    • @krushnamahapatra2751
      @krushnamahapatra2751 Před 2 měsíci

      hello user, what's your age, I have also started DSA little late, we can learn together if you are interested reply

  • @krcpr007
    @krcpr007 Před rokem +244

    Everyone is celebrating the new year and what are we doing... I can't forget this moment. keep striving...😇😇😇😇

    • @souvikghosh5768
      @souvikghosh5768 Před rokem +28

      He most probably made this video some days or weeks ago ....
      and his editor or he might just put it out today..
      Ofcourse he's not gonna waste 31st like this 🤣

    • @krcpr007
      @krcpr007 Před rokem +11

      @@souvikghosh5768 bro I'm talking about students who are watching videos right now or first January 🙂
      I know very well video can be scheduled as well in youtube when it will be released 🙂
      Happy new year bro 💫

    • @takeUforward
      @takeUforward  Před rokem +312

      I recorded it on 31st, edited on 31st, uploade it on 31st. No editor involved. 😄

    • @krcpr007
      @krcpr007 Před rokem +19

      @@takeUforward striver supremacy🛐

    • @darkelixir2517
      @darkelixir2517 Před rokem +6

      ​@@takeUforwardQuality is on its peak🕯️

  • @mubeenshaikh7711
    @mubeenshaikh7711 Před 3 měsíci +37

    I have started the A2Z DSA Sheet on 10 February 2024. Will comeback here to let you all know about the offers that I'm going to get... keep learning.

  • @pavitrasingh7833
    @pavitrasingh7833 Před 2 měsíci +8

    Bro i have never seen a guy explaining this much well . Your way of teaching is very rare

    • @aayush4056
      @aayush4056 Před měsícem

      pepcoding is also a gud channel, NOT FIGHTING, just leeting u know about one more GEM.

    • @pavitrasingh7833
      @pavitrasingh7833 Před měsícem

      @@aayush4056 ohhhh thankyouuu , I'll surely check it out

  • @brainify007
    @brainify007 Před rokem +18

    Thanks Striver for every effort you put for helping us 🔥😀 And happy new year!!!

  • @Constantine808
    @Constantine808 Před rokem +21

    Sir you are saviour 🥹🥲, you’ve just uploaded quality and expensive content for free. Your teaching is amazing 🤩

  • @harshithsshetty007
    @harshithsshetty007 Před 3 měsíci +2

    I started DSA with this and superb explanation by you sir completely understood the concept and subscribed too.

  • @Jegan_Kanthasamy
    @Jegan_Kanthasamy Před 4 měsíci +3

    Every time, when i started studying about DSA, i felt bored or frustrated, but this time by watch your video lecture, i didn't feel that way, instead i felt motivated to continue on this course, Thanks man i really grateful to you

  • @debrajmondal8659
    @debrajmondal8659 Před rokem +43

    Being from an tier 3 college is not an issue at all now because we have a brother and teacher like you 🥰 . Love you bhaiya . And yah UNDERSTOOD !

  • @saurabh8260
    @saurabh8260 Před rokem +61

    At this exact moment (12:01 am, 01.01.23 ) All of my friends are partying to celebrate their new year.
    And I am here watching this video. I hope all of my hustle, struggle and grind will pay off this year

    • @kothapalliavinashkumar8699
      @kothapalliavinashkumar8699 Před rokem +2

      Yes bro

    • @anishbishnoi29xD
      @anishbishnoi29xD Před rokem +1

      same

    • @deceptivedawwg1111
      @deceptivedawwg1111 Před rokem +2

      cmon dude , i understand your hustle and determination , but there are very very few moments which cant be skipped or avoided ...just make those stuff habit , thats it :D , good luck for what you aspire !

    • @saurabh8260
      @saurabh8260 Před rokem +2

      @@deceptivedawwg1111 thank you for replying to my comment. It reminded me to watch the new video about pattern programming which I was avoiding to watch. Thanks once again

    • @deceptivedawwg1111
      @deceptivedawwg1111 Před rokem +1

      @@saurabh8260 good luck!

  • @faddsfadds5690
    @faddsfadds5690 Před 6 měsíci +1

    I am a final year student literally i tried underdstanding time and space complexity since 3 years refering all top youtube channels but did'nt got this much of explaination as i got here , tq so much for your explaination sir , we are blessed to have you , i hope i will cover all your videos . Tq so much sir once again

  • @recursion18
    @recursion18 Před rokem +22

    What better than starting new year with striver new lecture
    Happy new year everyone 💞

  • @user-fo8fi4bb7m
    @user-fo8fi4bb7m Před 11 měsíci +5

    "Wow, I finally understand the concept of Time Complexity! Your explanation was clear and concise, making it so much easier to grasp. You're a superb teacher, and I really appreciate your ability to break down complex things and make them understandable. Thank you for sharing your knowledge and helping me expand my understanding. Keep up the excellent work!"

  • @AppaniMadhavi
    @AppaniMadhavi Před 4 měsíci

    With your explanation I able to predict many of code Time complexities easy way thank you bro...

  • @FireGamerz-of6vv
    @FireGamerz-of6vv Před 3 měsíci +6

    really u r great bro.i buyed 3 courses for DSA recently
    1)GFG
    2)learnYARD
    3)algoprep
    .But infront of you all are wasted.

  • @bhuppuagarwal24
    @bhuppuagarwal24 Před rokem +5

    Thank you, Raj, for explaining the concepts in detail. Although the topic was not naive to me listening to it still gave me info that I was not aware of. I am liking the way you are explaining the concepts and helping the community to understand DSA properly.

  • @ujjawaltyagi8540
    @ujjawaltyagi8540 Před rokem +9

    happy new year to you too bhaiya.....just one request please keep uploading videos for a2z dsa course MORE Frequently because if break is too long between videos then it affects consistency and we end up leaving course in mid way so hope we will see videos more frequently from now !

  • @vlnsatyasaivivekgulupalli3908

    Understood!!!
    Thankyou for taking your valuable time and helping in building ourselves

  • @keerthi5051
    @keerthi5051 Před 3 měsíci

    Thank you man, for the extraordinary explanation in all perspectives of an interviewer and the student.👍👊🙌🙌

  • @GaneshKumatole...
    @GaneshKumatole... Před 9 měsíci +8

    Yeah . UNDERSTOOD . 🔥🔥🔥
    Thank You , loving the A to Z Course on DSA .

  • @siddharthgupta384
    @siddharthgupta384 Před rokem +7

    Thank you sir for this course undoubtedly the best teacher on CZcams for DSA🌟

  • @mahendrasimha
    @mahendrasimha Před 2 měsíci

    Thanks a lot for understanding these concepts in such an easy and appealing way. The way you explain things is truly next level. Thanks, Striver bhai!🔥

  • @user-ck6bc2qo1d
    @user-ck6bc2qo1d Před 3 měsíci

    Understood. the last thing actually means if we take an example for it so it will be like,
    If you have to bake cookies for a party and the recipe is saying that it will take 100 seconds but you have TIME LIMIT of 1 second so you have to set the recipe for baking all the cookies in 1 second ,,
    similarly in programing if you have time limit of 1 second you're writing an algorithm and the time complexity of which is big 0(10 raise to the power 8) so you have to write it so it can perform all 10 to the power 8 operations in just one second..,,
    This is what the actual thing was described in the video,..
    Grateful to have tutor like you.

  • @sukhpreetsingh5200
    @sukhpreetsingh5200 Před rokem +3

    Understood!! Already Knew this topic but learn some extra points especially about how to represent in interviews..

  • @kirtiverma4924
    @kirtiverma4924 Před rokem +3

    Understood..waiting for your next video... Please complete the A2Z series as soon as possible.

  • @deepeshkumarpandey5469
    @deepeshkumarpandey5469 Před měsícem

    Understood
    Was a wonderful a compact details of all that is needed in an interview .

  • @ruchikasingh7315
    @ruchikasingh7315 Před 13 dny

    this is THE best course available for dsa. understood everything so far

  • @sachinboreoffl
    @sachinboreoffl Před rokem +3

    Starting the year with this video

  • @UECHarshaVardhanRavipalli

    Understood very clearly bhai!!!!!!!!🤗

  • @s41_rinapawar83
    @s41_rinapawar83 Před 24 dny +1

    Today, I decided to dive into DSA seriously. I finally wrapped my head around the whole time and space complexity thing. wish me luck

  • @tejasaher9863
    @tejasaher9863 Před 4 měsíci +1

    Understood Everything ❤❤❤❤❤❤❤❤
    Thank You So Much For This DSA Series ❤❤💕💕😍😍

  • @sourjyamitra3628
    @sourjyamitra3628 Před 2 měsíci +1

    Understood! I was always afraid of time complexity. Thanks for giving me the hope i was looking for

  • @lavanyaprakashjampana933

    STRIVER I recently completed your DP series it's amazing and i understand well and good ..
    But in this video you look so handsome as your explanation..
    Happy new year keep glowing and make everyone glow with your content......

  • @waltgrace94
    @waltgrace94 Před 8 měsíci +3

    Hands down the fastest and easiest way to learn time complexity on the internet. Enough to get you going.

  • @GopalSingh-yf9fc
    @GopalSingh-yf9fc Před 4 měsíci

    You have put a lot of effort on the video so that we don't have any doubt with the concept . Thanks a lot for taking us forward ✌🙏
    Understood both concepts🔥

  • @souravkashyap5366
    @souravkashyap5366 Před 6 měsíci

    yeah Understood , thanks a lot. Just started it with CSharp(C#).

  • @shahwezahmad1743
    @shahwezahmad1743 Před rokem +34

    time complexity: the rate at which time is taken increases with respect to the input
    TC: Represent in Big 0h notation: O(Time taken)
    Calculate TC as :
    1. worst case
    2. avoid constant
    3. avoid lower value
    Space Complexity: Memory Space which the program take
    it is also define as auxiliary space(space that need to solve problem)+ input space(space that need to store input)

  • @sayankabir7958
    @sayankabir7958 Před rokem +5

    awesome 🔥
    just a suggestion. keep the facecam video pinned in right/left bottom corner and the screen behind that on entire screen. that way, the video will look a lot more neat and engaging also. Thanks

    • @takeUforward
      @takeUforward  Před rokem +6

      We don’t wanna stretch the ipad screen reso too much unnecessarily. We will have it like this only.
      It has worked well for us in dp, graphs. Post experimenting, we have found this to be more engaging and to have more screen presence

  • @manickam8886
    @manickam8886 Před 23 dny

    Thank you for creating this video. it's very clear, and I understood it well.

  • @jaisuriyar5259
    @jaisuriyar5259 Před 11 dny +1

    Thank you for making this video in English. Very helpful content.

  • @Lucifer-xt7un
    @Lucifer-xt7un Před rokem +5

    Bro please maintain the consistency of atleast 3 videos a week

  • @Ganesh_Chaubey
    @Ganesh_Chaubey Před 11 měsíci +3

    If striver sir make a DSA course in hindi........then no one can match that course of content.......i love to study with striver sir coz of teaching speed and important content are there in the videos .....🤩

  • @sidzBeats
    @sidzBeats Před 11 dny

    I'm just lookout for c++ and dsa and finally i got someone where i can be reliable. Thanks for such course which is too much enjoyable. I can watch this without being bored ❤
    #striver thanks ❤

  • @harshjindal48
    @harshjindal48 Před 7 měsíci

    the method of explaining is amazing and i totally appreciate your efforts bhaiya and yeah understood!

  • @user-pj7cn8ns4m
    @user-pj7cn8ns4m Před 7 měsíci

    UNDERSTOOD, thanks for giving such a good explanation

  • @radhikadorlikar3880
    @radhikadorlikar3880 Před 7 měsíci

    Yes Understood.
    Thanks for taking us forward❤

  • @nkangprecious4339
    @nkangprecious4339 Před 3 měsíci

    This has to be the best video I have watched on TC.
    Damn!

  • @AYuSh-jm8uk
    @AYuSh-jm8uk Před 7 dny

    I have started this course at summer(24/5/24) break before my third year starts lets see what i am going to achieve. Lets strive

  • @sharadpanchal1
    @sharadpanchal1 Před 2 měsíci +1

    I have Started the DSAA2Z Sheet from today onwards

  • @samreenimam8608
    @samreenimam8608 Před 3 měsíci

    Understood...glad to have you!❤

  • @blob_blob7554
    @blob_blob7554 Před 3 měsíci

    understood, I really appriciate what you are doing man. Thanks!

  • @praveensingh1711
    @praveensingh1711 Před 4 měsíci

    Really very nice explanation..it cleared all my doubts.. thanks bro

  • @henahena7368
    @henahena7368 Před 2 měsíci

    Understood. I have been trying to learn DSA for a long time and I quit because the lectures and things are not organized and even if some are organized they don't show you which questions to deal with first. but these ones I wonder why nobody hasn't told me about. Anyway now I have no opportunity but to master DSA. I am really grateful, this way you are changing my course of life. A lot of others are like me too. Love you brother.

  • @harshyadav1214
    @harshyadav1214 Před 4 měsíci +1

    Thanks Striver, This video cleared by concept.

  • @Sarjais_Raja
    @Sarjais_Raja Před 4 dny

    Thanks a bunch for this amazing course

  • @user-hp9kj8qt1h
    @user-hp9kj8qt1h Před měsícem

    I am in my first yr in a tier 3 college and I'm starting this playlist today 8 April 2024 (Monday). Will comback soon to tell you about the offers in going to get. Wish me luck.

  • @SSECAnkitNirmal
    @SSECAnkitNirmal Před 2 měsíci

    Thanks brother for making the videos 🎉 Very clear explanation , love it man

  • @shubhamagarwal1434
    @shubhamagarwal1434 Před 7 měsíci

    Very nice explanation...God Bless You

  • @nofilter01
    @nofilter01 Před měsícem

    Understood, beautifully explained all the aspects
    thamks brother😇

  • @spaceembassy365
    @spaceembassy365 Před 3 měsíci +1

    understood bhaya,thanku soo soo much for providing this knowledge

  • @akashchristopher
    @akashchristopher Před 16 dny

    Thank you from the bottom of the heart❤

  • @shubhamagarwal1434
    @shubhamagarwal1434 Před 7 dny

    #Free Education For All... # Bhishma Pitamah of DSA...You could have earned in lacs by putting it as paid couses on udamey or any other elaerning portals, but you decided to make it free...it requires a greate sacrifice and a feeling of giving back to community, there might be very few peope in world who does this..."विद्या का दान ही सर्वोत्तम दान होता है" Hats Off to you man, Salute from 10+ yrs exp guy from BLR, India...

  • @rajbhaskar1206
    @rajbhaskar1206 Před 3 měsíci

    Thanks! Understood the basics...

  • @PrathameshSarode-rh2dn

    Understood! Thank you Striver♥

  • @ShivamSingh-he9ij
    @ShivamSingh-he9ij Před měsícem

    understood the concept really well, thanks striver :)

  • @vaibhavroy4393
    @vaibhavroy4393 Před 2 měsíci

    Really hats off to you bhaiya for providing such a good content free we are very thankful to you for this .If anyone is worrying about DSA just follow striver full DSA playlist you will never get an amazing content in such a structured manner.Thank you so much bhaiya

  • @NiteshKumar-xg1ly
    @NiteshKumar-xg1ly Před měsícem

    Understood everything in this lecture❤

  • @amanprasad4480
    @amanprasad4480 Před 3 měsíci +2

    After getting messed up with boring schedule and syllabus of the college curriculum ad wasting 3 semester's
    I had got stressed and depressed about the DSA( That i can't do it ) but after getting teased by my fellow classmates I decided that [Ab toh Fodna hai bas] thanks ko @takeUforward for teaching from the basics.
    Understood

  • @bravo2992
    @bravo2992 Před 3 měsíci

    Very nicely conveyed! Superb! Understood...

  • @pialaoti-zc9ob
    @pialaoti-zc9ob Před 7 měsíci

    I understand very well this topic, thank u ❤

  • @suryasaipalthi
    @suryasaipalthi Před 6 měsíci

    Common man u are giving quality content quite underrated, And yes UNDERSTOOD

  • @user-nh6kp9tf3m
    @user-nh6kp9tf3m Před 5 měsíci

    understood
    well and good the idea about the time and space complexity 💖

  • @shailenTou
    @shailenTou Před 4 měsíci

    Thanks for the nice explanations.

  • @KarthikSaakre
    @KarthikSaakre Před 4 měsíci

    Thanks for taking this initiative. helpful video.

  • @BishalBhat2002
    @BishalBhat2002 Před 3 měsíci

    I just loved this course ...

  • @abdullahmahi4490
    @abdullahmahi4490 Před 7 měsíci

    understood. I am a Bangladeshi currently majoring in CS in the USA. Watching from Texas

  • @bhargavavinash2218
    @bhargavavinash2218 Před 3 měsíci +1

    understood and moving on to the next one.

  • @konankikeerthi
    @konankikeerthi Před 8 dny

    thank you brother..it is very helpful

  • @akshajbehal5258
    @akshajbehal5258 Před 3 měsíci

    Understood and loved it

  • @manassharma3631
    @manassharma3631 Před 3 měsíci

    understood much better, thank you brother

  • @divyaperam5218
    @divyaperam5218 Před 4 měsíci

    Understood wonderful explanation sir

  • @vanshthukral5477
    @vanshthukral5477 Před 6 měsíci

    Understood. Thanks for creating amazing content.

  • @BTCSEDIVYA
    @BTCSEDIVYA Před 7 měsíci

    understood..crystal clear

  • @AbhishekKumar-ep5uo
    @AbhishekKumar-ep5uo Před 7 měsíci

    Awesome lecture bhaiya toally satisfied through this lecture

  • @avichaltrivedi7700
    @avichaltrivedi7700 Před 4 měsíci

    explained very well, understood

  • @user-ip1js8nb3p
    @user-ip1js8nb3p Před měsícem

    understood very wellll.......

  • @junaiid0104
    @junaiid0104 Před 3 měsíci

    thank you for everything sir !!!🙏🏼

  • @sajanchadalavada8525
    @sajanchadalavada8525 Před 3 měsíci

    Understood. Today learned something new.

  • @bhavanaanu9076
    @bhavanaanu9076 Před měsícem +1

    Very well explained 😀

  • @onyemaechianthonyeze202
    @onyemaechianthonyeze202 Před měsícem

    I can believe i am having to understand this almighty big O notation. thank you so much sir

  • @Hipfire786
    @Hipfire786 Před 2 měsíci

    understood, sir great video

  • @PuruGupta-zg2zs
    @PuruGupta-zg2zs Před 2 měsíci

    thankyou striver for providing knowledge

  • @sneha_satheesh
    @sneha_satheesh Před 14 dny

    Understood!!thank you sir

  • @gabbargaming8464
    @gabbargaming8464 Před 4 měsíci

    Understood All the concept

  • @bindu6790
    @bindu6790 Před 4 měsíci

    Super cool video for time and space compexity ,same content as scaler platform

  • @agogubaid2360
    @agogubaid2360 Před 5 měsíci

    Understand & Outstanding