Count All Possible Routes II Dynamic Programming II DP II Leetcode 1575

Sdílet
Vložit
  • čas přidán 27. 07. 2024
  • In this video, I'll talk about how to solve Leetcode 1575. Count All Possible Routes II DP
    Checkout DSA-169 Series: • Aryan DSA-169 Series |...
    Problem Link: leetcode.com/problems/count-a...
    Code & Notes: drive.google.com/file/d/1VtMC...
    Count All Possible Routes II Dynamic Programming II DP II Leetcode 1575
    Let's Connect:
    📝Linkedin: / aryan-mittal-0077
    📸 Instagram: / aryan_mittal_007
    📱Telegram : t.me/aryan_mittal_group
    🤖 Github: github.com/aryan-0077
    🛍️ Products I use in Videos: (✨ Marked for Mostly requested Products)
    Main Camera (Canon 200D ii): amzn.to/41cfS5h
    Vlog Camera (iphone 13): amzn.to/42aOJRh
    Tripod for Lectures: amzn.to/3HMoloF
    Tripod for Vlogs: amzn.to/44wGL6L
    ✨Mic: amzn.to/41bj8gU
    Shadow Multi Colour Light: amzn.to/41bmIrq
    Main Light: amzn.to/3LF6BNb
    Tripod for Lights: amzn.to/3LFcQAt
    Softbox for Lights: amzn.to/42mHqWE
    ✨My Pen Tablet for Notes: amzn.to/44A61ZJ
    ✨New Tablet for Notes: amzn.to/44BjTDa
    Tablet Stand: amzn.to/3NMFIJR
    Power Bank: amzn.to/421yHsZ
    ✨USB Hub: amzn.to/3p8NGTf
    ✨HardDisk to store Lectures: amzn.to/3HKafEs
    ✨My Laptop: amzn.to/44w12ct
    ✨My Monitor: amzn.to/3LCG6YL
    My UPS: amzn.to/3Lydy2y
    My UPS old: amzn.to/3LXT0C3
    ✨My Mouse: amzn.to/3LYmJdY
    ✨My Keyboard: amzn.to/3NJs4ah
    Resources you can try:
    Learn Coding: • Complete RoadMap for C...
    🎥Channel Playlists
    🎥 Baap Graph Series - by Aryan: • Baap Graph Series - by...
    🎥Dynamic Programming: • Complete Dynamic Progr...
    🎥Bit Manipulation: • Complete BIT MANIPULAT...
    🎥Mathematics for DSA: • Complete Mathematics f...
    🎥Leetcode Top Interview Questions: • FAANG & Leetcode Inter...
    🎥Codeforces Problem B Ladder: • Complete PROBLEM B LAD...
    🎥Codeforces Problem C Ladder: • Codeforces PROBLEM C L...
    🎥Codeforces Problem D Ladder: • Complete PROBLEM D LAD...
    🎥 Top 150 Interview Questions: • Top 150 Interview Ques...
    🎥 Complete Array Problem Playlist: • Complete Array Intuit...
    🎥 Complete Binary Search Problem Playlist: • Complete Binary Search...
    🎥 Complete Stack Playlist: • Complete Stack & Queue...
    🎥 Complete Graph Problem Playlist: • Complete Graph Intuiti...
    🎥 Complete TREE Playlist: • Complete TREE Intuitio...
    🎥 Complete DP Problem Solving: • Complete DP Intuition ...
    🎥 Complete Linked List: • Complete Linked List I...
    🎥 Complete Greedy Problem Playlist: • Complete Greedy Intui...
    🎥 Complete Divide & Conquer Algorithm Playlist: • Complete Divide & Conq...
    🎥 Complete Trie Playlist: • Complete Trie Intuitio...
    🎥 Complete Mathematics & Number Theory Problems: • Complete Mathematics &...
    About Channel:
    We teach about how you can grow in life & educate about programming in Fun & Intuitional way.
    About Me:
    I am Aryan Mittal - a Software Engineer, Speaker, Creator & Educator. During my free time, I create programming education content on this channel & also how to use that to grow :)
    ✨ Timelines✨
    0:00 - Bakwas
    0:30 - Problem Explanation & Intuition
    4:52 - Example & Building Intuition from that
    14:45 - Summing Up
    16:18 - Code Explanation & Complexity
    ✨ Hashtags ✨
    #programming #Interviews #leetcode #faang #maang #datastructures #algorithms

Komentáře • 19

  • @ARYANMITTAL
    @ARYANMITTAL  Před rokem +4

    It's an Easy one, do try by yourself first 🫂 !!
    Checkout DSA-169 Series: czcams.com/video/5BuKVS-Vnws/video.html
    Problem Link: leetcode.com/problems/count-all-possible-routes/description/
    Code & Notes: drive.google.com/file/d/1VtMCLaOP91gqnPsi4ACm8kiRfPt3PKX5/view?usp=sharing

    • @DineshKumar-pm6iu
      @DineshKumar-pm6iu Před rokem

      Hello Aryan, Hope you are doing well, What would you do if need to print those paths ?
      As like the in explanation ? ie 1->4->2->3
      The approach that comes to my mind is backtracking, wt about you ? Anybody can answer

  • @koushikboddapalli4400
    @koushikboddapalli4400 Před rokem +6

    I think if(fuel < 0) can never be reached in the recursion since we are checking that condition in the loop😊

    • @dustbabymeme
      @dustbabymeme Před rokem +1

      yes because we are taking abs() na

    • @varunaggarwal7126
      @varunaggarwal7126 Před rokem +1

      I removed that and the code is submitted successfully, no base case recursion, I know its strange but the checking inside for loop is making sure of that.

  • @beinghappy9223
    @beinghappy9223 Před rokem

    Thanks for the amazing explanation

  • @gouthamp9066
    @gouthamp9066 Před rokem

    I can able to figure out the entire problem without any doubt but in the last 10 seconds of the video what you are saying I can't figure out 🤣🤣🤣

  • @146_shashanks4
    @146_shashanks4 Před rokem +2

    Bro please solve today's leetcode weekly contest

  • @robinmahato
    @robinmahato Před rokem

    your explanation is next level bro thanks for the your efforts

  • @DivineVision201
    @DivineVision201 Před rokem

    Thanks Aryan for the video. Wonderful explanation. Truly loved it.

  • @cod-phy1646
    @cod-phy1646 Před rokem

    keep going brother....excellent explaination😃

  • @sauravbiswajit8091
    @sauravbiswajit8091 Před rokem

    Hii...once again with a high energy and explained with a easy way...thanks a lot.
    It's a request,can u please look into 2035 leetcode dp problem if possible and please provide a solution. Bcz I can't found a proper solution for this question

  • @rahuljha5270
    @rahuljha5270 Před rokem

    why not you did abs(locations[i] - locations[start]) >= fuel

  • @DineshKumar-pm6iu
    @DineshKumar-pm6iu Před rokem

    Hello Aryan, Hope you are doing well, What would you do if need to print those paths ?
    As like the in explanation ? ie 1->4->2->3
    The approach that comes to my mind is backtracking, wt about you ? Anybody can answer

  • @stuartYoung559
    @stuartYoung559 Před rokem

    cant we initialize ans variable globally

  • @UmerKarachiwala2612
    @UmerKarachiwala2612 Před rokem

    Hello bro can you tell me how do you use your samaung tab for making videos?

  • @anexocelisia9377
    @anexocelisia9377 Před rokem +1

    Bhaiya I'm curious, you solve these questions all by yourself or you understand the solution first and then come here to explain to us.

    • @ARYANMITTAL
      @ARYANMITTAL  Před rokem +16

      Yaa bro, i first solve by myself (some questions couldn’t reach to max optimisation, so have to look for those optimisations), after solving(either entire code or atleast logic if time is less and have to leave for office), then either refactor the code to make it clean or get some similar logic code as that of mine which needs little to no refactoring, as most of time is taken in making notes & stuff.

    • @anexocelisia9377
      @anexocelisia9377 Před rokem +2

      @@ARYANMITTAL 👍