Time Limit Exceeded- How To Avoid TLE ? | Trick To Pass All Test Cases In Competitive Programming

Поділитися
Вставка
  • Опубліковано 5 жов 2024
  • Time Limit Exceeded (TLE) Time Out Error mainly occurs when either program is not able to exit gracefully or some of the test cases are left for validation in a given time constraint for that problem.
    This video explains how to overcome TLE by choosing the right algorithm and
    This trick is used by the competitive programmer to approach problems in competitive programming contests.
    🔴 DONT CLICK THIS: bit.ly/2G4cEuc
    👍 Like us on Facebook: / hackerranksolutiontuto...
    💎Share this video with a friend: • Time Limit Exceeded- H...
    ✚ Join our community ►
    👉 Coding interview preparation group: / codingip
    👉 Telegram link for algorithmic tutorial: t.me/javaaid
    👉 Telegram link for hackerrank solutions: t.me/hackerran...
    ✅ Recommended playlists ►
    👉 All hackerrank solutions: • How To Master In Data ...
    👋 Let’s Connect ►
    Git Hub: github.com/kan...
    Twitter: / kanahaiyagupta
    Linked in: / kanahaiya-gupta
    Facebook: / coolkanahaiya
    Instagram: / coolkanahaiya
    #JAVAAID #TLE #timelimitexceeded #competitiveprogramming #HackerRankSolutions #HackerRankTutorials #implementation #prefixsum #HackerRank #JavaAidTutorials #Programming #DataStructures #algorithms #coding #competitiveprogramming #JavaAidTutorials #Java #codinginterview #problemsolving #KanahaiyaGupta #hackerrankchallenges

КОМЕНТАРІ • 61

  • @JavaAidTutorials
    @JavaAidTutorials  5 років тому +10

    JAVAAID community: UA-cam recently changed the way they monetize my content. My channel now needs 1,000 subscribers so it would be awesome if you could show your support by both watching my videos and subscribing to my channel if you haven’t already done so. Monetizing my videos allows me to invest back into the channel with new equipment so a small gesture from you goes a huge way for me. Many thanks for your support!

    • @cirex314
      @cirex314 5 років тому

      I wouldn't recommend putting ads on your videos though...

    • @JavaAidTutorials
      @JavaAidTutorials  5 років тому +4

      @@cirex314 Even I do not like to put ads but there is no way to keep this channel alive. as there is a lot of hard work and time is required to maintain one channel with high-quality content which is very difficult for an individual.
      monetizing the channel can help me to outsource some of the work to the third party so that I can focus on core content instead of doing everything on my own. If you have any good suggestion let me know.

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

    After watching this video all my doubts are cleared now...Thank you for explaining so well

  • @mdsohailhussain8420
    @mdsohailhussain8420 3 роки тому +2

    One of the best video which I found in youTube now my concept is clear.......
    Thanks..... ❤❤❤and keep it up....

  • @shoaibkhalid6156
    @shoaibkhalid6156 3 роки тому +2

    I don't comment mostly but your video is undoubtedly amazing. Concepts clear

  • @mayurkadam
    @mayurkadam 5 років тому +3

    Thank you so much 👍 its really going to help me in future and most of the time i saw that kind of error now i know the reason 🙏
    Once again thank you 👍 and keep doing it

    • @JavaAidTutorials
      @JavaAidTutorials  5 років тому +1

      thank you @Mayur..
      Stay tuned.. keep watching, keep commenting to motivate me..:)

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

    Basded on your video, it seems that your problem happens on lists that are larger then 10^8, but I am getting the same error on a size of 6 elements, which is by far no where near 10^8. So why am I getting a TLE?

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

    Thanks for such an amazing explanation.Please upload some more video on data structure and algorithm

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

      welcome 🙂
      browse our channel, you will find lot of interesting video out there which will help you to learn something new.

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

    even then if you are getting TLE after all this jst replace endl with "
    " in c++

  • @RahulKumar-qu1if
    @RahulKumar-qu1if 4 роки тому +2

    Best explanation ever!🔥🔥

  • @rajughosh6173
    @rajughosh6173 5 років тому +1

    Really needed this kind of tutorial thanks and please make a video on constraints.

    • @JavaAidTutorials
      @JavaAidTutorials  5 років тому

      thanks, @Raju for feedback.
      can you elaborate your query? what constraints video you are talking about?

    • @rajughosh6173
      @rajughosh6173 5 років тому +1

      @@JavaAidTutorials sir constraints like how to understand test cases like hidden test cases.I am having hard time understanding how test cases work.

    • @JavaAidTutorials
      @JavaAidTutorials  5 років тому

      @@rajughosh6173 Oh ok. got your problem now.
      I can not promise right away but will try for sure.

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

    Very useful video..thanks!

  • @nicet7330
    @nicet7330 8 місяців тому +1

    Love you bro ❤.

  • @srinidhisalur4430
    @srinidhisalur4430 5 років тому +1

    Thank you sir.. please do more videos😊

  • @wasit-shafi
    @wasit-shafi 4 роки тому +1

    thank you it was very helpful....keep it up...

  • @rajarao6377
    @rajarao6377 4 роки тому +4

    Ahhhhhh TLE, My worst nightmare!!!!!!

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

      Don't worry every coder has to go through this nighmare..:)

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

    Great graphics

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

    This was so useful... I m beginner to programming so I m using python.... If I use python it's waste...

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

      I does not matter what language you use for competitive programming it will still help you to avoid TLE when you submit your solution in python.

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

    When we preparing data structure and algorithm and dont know merge sort algorithm Or any algorithm but know the basics of dsa.... What is do when we got this error

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

      just try to find an alternative logic to solve the problem and see if it has less complexity then go for the implementation.

  • @sumantopal558
    @sumantopal558 5 років тому +2

    Best Explaination

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

    It's not working....there is a problem in which input is

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

      May i know in which language you have written your code and if you are doing any processing again in your nested for loop.?

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

      @@JavaAidTutorials l have written in java. I have used only nested loop. Inside the inner loop there is only a if statement...that's it. Without the if statement the program cannot be written or the question cannot be solved.

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

    thanks very much

  • @Mike-mw1fu
    @Mike-mw1fu 4 роки тому

    I can't understand at 6:00 calculating of running time of Bubble sort.
    Why 10^12 operations need 1*10^4 sec?
    Video said 10^8 operation ~ 1 sec so 10^12 operations will have to be 1.5 sec Not
    2.77 Hrs!!
    May you please help me if I'm wrong?
    Do reply please I'm so frustrated.
    Thanks a millions!

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

      ITs simple calculation brother you can understand it in this way.
      If 10^8 operation takes 1 sec
      then 1 operation will take (1/10^8) sec
      then 10^12 operation will take (1/10^8)*10^12 sec which is equal to 10^4 sec.
      then you can convert this seconds into hours by dividing it with 3600.
      I hope you got your query answered.

    • @Mike-mw1fu
      @Mike-mw1fu 4 роки тому +1

      @@JavaAidTutorials I got it. Heartiest Thank you Brother! By the way, May you know any good video channel of explaining Computer Organization and architecture? If yes, Can you please tell me ?

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

      thanks for your feedback brother but I really do not have idea who teaches CO on youtube.
      either you can try youtube search or check with your friends.

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

    Like a blessing thanks 👌

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

    How to apply these on coding

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

      Try watching Array manipulation hackerrank tutorial video and apply this technique.

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

    More videos please

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

      We are working on it. Mean while you can also check out more videos in our channel to learn something new.

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

    Could this happen in a real interview though?

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

      mostly competitive programmer face this problem but in an interview its rare

  • @stonecoldcold2941
    @stonecoldcold2941 5 років тому +1

    Very helpful

  • @evandrix
    @evandrix 5 років тому +1

    can you publish the cheatsheet on github

    • @JavaAidTutorials
      @JavaAidTutorials  5 років тому

      Let me check on this, whether I still have it or not?

  • @anshulvairagade1604
    @anshulvairagade1604 5 років тому +1

    Can I use python in competitive coding contents ?
    Do reply please I m so frustrated

    • @JavaAidTutorials
      @JavaAidTutorials  5 років тому

      It depends on the contest in which contest you are going to participate. But most of the people uses C++ and some uses java for faster execution.

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

    if the time is 2 sec the number of operations is 2*10^8 ?

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

      absolutely correct!
      but its all an approx value which will go from (1*10^8 to 4*10^8) based on the language which you are using to code.
      for C it may be 10^8 and for python it may 4*10^8.