Reconstruct itinerary || Leetcode

Sdílet
Vložit
  • čas přidán 6. 09. 2024
  • Please consume this content on nados.pepcoding.com for a richer experience. It is necessary to solve the questions while watching videos, nados.pepcoding.com enables that.
    NADOS also enables doubt support, career opportunities and contests besides free of charge content for learning. Pepcoding has taken the initiative to provide counselling and learning resources to all curious, skillful and dedicated Indian coders. This video is part of the series to impart industry-level web development and programming skills in the community.
    We also provide professional courses with live classes and placement opportunities.
    For more free study resources and information about the courses, visit: www.pepcoding....
    Have a look at our result: www.pepcoding....
    Follow us on our CZcams page: / pepcoding
    Follow us on our FB page: / pepcoding
    Follow us on Instagram: / pepcoding
    Follow us on LinkedIn: / pepcoding-education
    Follow us on Pinterest: / _created
    Follow us on Twitter: home
    .
    .
    .
    Happy Programming !!! Pep it up
    .
    .
    .
    #pepcoding #code #coder #codinglife #programming #coding #java #freeresources #datastrucutres #pepcode #competitive #competitiveprogramming #softwareengineer #engineering #engineer

Komentáře • 24

  • @Beingyash7
    @Beingyash7 Před 2 lety +9

    what a command over graph ! 👑

  • @devraj-2310
    @devraj-2310 Před rokem

    Best explaination for this problem.

  • @LegitGamer2345
    @LegitGamer2345 Před 3 lety +1

    oh so we are making visited of edges! thank you so much sir crystal clear hogaya

  • @ADNANAHMED-eo5xx
    @ADNANAHMED-eo5xx Před 2 lety

    Thanks... gr8 explanation

  • @heisenberg1844
    @heisenberg1844 Před 2 lety

    Well explained. Thanks.

  • @SagarKumar-rn4cq
    @SagarKumar-rn4cq Před rokem

    Bhaiyo topological sort,mother vertex,kosaraju algo and yee sab connected Hai

  • @vaibhavis1
    @vaibhavis1 Před 2 lety

    It will fail a case, where the lexographically smallest result is not valid, i.e. doesn't visit all the edges. Example: [["JFK","KUL"],["JFK","NRT"],["NRT","JFK"]]
    So in this case we will have to go ahead with Linked List instead of prioirty Queue, maintain a overall edges, and number of edge removed count,
    and add back the string to LL if they don't match.

    • @MGtvMusic
      @MGtvMusic Před 2 lety

      It will work!

    • @MGtvMusic
      @MGtvMusic Před 2 lety

      It is working!!

    • @vishalgaurav4411
      @vishalgaurav4411 Před 2 lety

      yes. but how his code s working?

    • @MGtvMusic
      @MGtvMusic Před 2 lety

      @@vishalgaurav4411 Just do a dry run ,It covers this case too

    • @kumarankit5726
      @kumarankit5726 Před 2 lety

      @@vishalgaurav4411 see with this approach kul will be added first in last position because no dfs call can be done from kul as there is no ticket from kul.And this is what we need .We need the location that will be visited at last in the last position and the place from where no other places can be visited shall be last.

  • @rupdeepthey
    @rupdeepthey Před rokem

    King.

  • @geetanjaligoyal7291
    @geetanjaligoyal7291 Před 2 lety

    [["JFK","KUL"],["JFK","NRT"],["NRT","JFK"]] ye wala case kaise handle ho rha hai? can you pls walkthro' this once?

  • @raunaknarayan4092
    @raunaknarayan4092 Před 2 lety

    Time complexity tow bataye heen nhi

  • @devir9674
    @devir9674 Před 2 lety

    Today loudly bol lijiye bhai pls