Valid Arrangement of Pairs | Leetcode 2097

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

КОМЕНТАРІ • 39

  • @JasbirSingh-kp4eu
    @JasbirSingh-kp4eu Місяць тому +8

    I am regular solver of Leetcode as I think it helps to build logic even when doing dev work in day to day job and these videos helps whenever I am stuck. Thanks for the dedication of making these videos.🙏

  • @21flame72
    @21flame72 Місяць тому +1

    30 min video behind seen is lot of hardwork thankyou so much sir

  • @lilkamal8607
    @lilkamal8607 Місяць тому

    Thanks for detailed explanation ❤

  • @Laxman_Singh_07
    @Laxman_Singh_07 Місяць тому

    thanku sir ji

  • @leepakshiyadav1643
    @leepakshiyadav1643 Місяць тому

    Great explanation. 👏

  • @aaravgulati2
    @aaravgulati2 Місяць тому

    Instead of using graph can we directly use maps to find the start and the end node?

    • @techdose4u
      @techdose4u  Місяць тому

      still the map will be counting indegree and outdegree.
      But Euler path will be required anyhow you try solving.

  • @muhammadtayyab9587
    @muhammadtayyab9587 Місяць тому

    amazing, sir what is the name of this digital board you use for explaination?

  • @roshanbangar1334
    @roshanbangar1334 Місяць тому +1

    Well explained. Best solution. Clear now, anyways how to check if the euler path exist or not ?

    • @techdose4u
      @techdose4u  Місяць тому +1

      In a directed graph.
      If all nodes have even indegree & outdegree then Euler circuit exists as well as path.
      OR
      if exactly 2 nodes have indegree-Outdegree = 1 then too path exists but no circuit.
      Also, All edges must be in 1 component in a multi component system.
      For undirected graph, Please refer my previous video from description link.

    • @roshanbangar1334
      @roshanbangar1334 Місяць тому

      @@techdose4u Got it. Thank you!

  • @YashGupta-h3z
    @YashGupta-h3z Місяць тому

    Hey!
    In the end of the video you told the difference between map and unordered_map. But while submitting the code, the opposite is happening i.e. map is giving tle whereas unordered_map is giving pretty good runtime. Can you explain why is that the case? Thank you!
    Edit: great explanation

  • @sailendrachettri8521
    @sailendrachettri8521 Місяць тому

    Thank you sir :)

  • @jaatharsh
    @jaatharsh Місяць тому

    awesome thankyou

  • @21flame72
    @21flame72 Місяць тому

    Tnakyou sir

  • @avdhootgole2773
    @avdhootgole2773 Місяць тому

    Got that batch!!!

  • @PCCOERCoder
    @PCCOERCoder Місяць тому

    Lecture successfully completed on 30/11/2024 🔥🔥

  • @androidterminal3924
    @androidterminal3924 Місяць тому +1

    TLE

    • @avdhootgole2773
      @avdhootgole2773 Місяць тому

      Are you inserting element in front instead of push_back to avoid reverse()?

    • @vikasvoruganti7490
      @vikasvoruganti7490 Місяць тому

      Based on test cases instead of ordered map use unordered map...

    • @avdhootgole2773
      @avdhootgole2773 Місяць тому

      @@vikasvoruganti7490 Mine worked tho

    • @techdose4u
      @techdose4u  Місяць тому +1

      try ordered map for guaranteed logN complexity

  • @tarunkolla01
    @tarunkolla01 Місяць тому

    haha i love you

  • @akashchaudhury3240
    @akashchaudhury3240 Місяць тому

    Who is deciding the name of this algos? :|

    • @techdose4u
      @techdose4u  Місяць тому

      Carl Hierholzer is a German Mathematician :)