Lowest Common Ancestor of a BST - LeetCode 235 - JavaScript

Поділитися
Вставка
  • Опубліковано 12 лис 2024

КОМЕНТАРІ • 17

  • @alexandremachado4476
    @alexandremachado4476 2 місяці тому

    Thank you so much! Liked and subscribed 🙏🏾❤️

  • @a2m2tkyo
    @a2m2tkyo 2 місяці тому

    This got upgraded to medium difficulty since you posted this.

  • @melanieprevot4926
    @melanieprevot4926 2 роки тому

    Nice explanation. Very clear! Thank you.

  • @wabbit2158
    @wabbit2158 2 роки тому

    Very nice, one of the best recursive examples

    • @AlgoJS
      @AlgoJS  2 роки тому

      Thanks wabbit, keep on grinding leetcode!

  • @LSUHEBERT
    @LSUHEBERT 2 роки тому

    Awesome solution. This was really helpful for me!

    • @AlgoJS
      @AlgoJS  2 роки тому

      Glad it helped!

  • @derso2870
    @derso2870 2 роки тому

    Thank you for your explanation, really helps me a lot.

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

      Anytime Derso, thanks for watching 👍

  • @bandekhoda7801
    @bandekhoda7801 Рік тому +1

    Great video, subscribed 💚.
    And may I ask a question?
    How do you write this in JavaScript when it's not available in the JavaScript category?
    What i mean is that whenever i click on the JavaScript questions there are only around 20 30 questions and no sign of this question that you're solving.

    • @alexgabriel5877
      @alexgabriel5877 Рік тому +2

      Javascript category is a different thing - usually to implement stuff like built-in methods etc. , you need algorithms section, there you can code in any language

    • @bandekhoda7801
      @bandekhoda7801 Рік тому +1

      @@alexgabriel5877 oh interesting. tnx for the reply man

  • @brianspinos2589
    @brianspinos2589 8 місяців тому

    Can’t we do a binary search for the node that is between p and q ? - that way it would be O(log N)

  • @seth_king_codes
    @seth_king_codes 2 роки тому

    thanks again

    • @AlgoJS
      @AlgoJS  2 роки тому

      No problem Seth

  • @gmennc2648
    @gmennc2648 Рік тому

    I’d like to see this in Python.

  • @renanmatulianes7497
    @renanmatulianes7497 3 місяці тому

    What if p == q? I think it wouldn’t work