LeetCode 564 - Find the Closest Palindrome - Java

Поделиться
HTML-код
  • Опубликовано: 27 окт 2024

Комментарии • 6

  • @CheeseFest-
    @CheeseFest- 2 месяца назад +5

    Nice solution These types of problems can be so annoying

    • @Alpha-Code
      @Alpha-Code  2 месяца назад +2

      Yeah this one was pretty annoying :)

  • @soubhagyamohapatra3665
    @soubhagyamohapatra3665 2 месяца назад +2

    Quite a bit of edge cases in this problem, I was able to get to the reversing the first n/2 digits and subtracting and adding 1 to the significant bits but eventually gave up on trying to search for measures that would take care of these 101 and 99 cases. Glad I was able to come across your video! Great explanation, I wish you all the best in everything that you are doing. Thank you tons for posting content that helps people like us!

  • @ShubhamSharma-sf8wk
    @ShubhamSharma-sf8wk 2 месяца назад +2

    Very hard to come up with a solution if you have never seen this problem before

    • @Alpha-Code
      @Alpha-Code  2 месяца назад +1

      yea, ive seen a few like this before but hard to come up with all the edge cases. I think for some other ones I could build all palindromes and binary search through them or something.

  • @satviksrinivas8764
    @satviksrinivas8764 2 месяца назад

    AlphaCode!!!