Minimum Characters to be Added at Front to make String Palindrome | Problem of the Day: 02/10/22

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

КОМЕНТАРІ •

  • @akshitkathuria3516
    @akshitkathuria3516 Рік тому +3

    Significance of adding $ ->--->$ helps us because lps function calculates longest proper prefix which means if complete string is a palindrome the lps.back() will always be one less than length of the string but adding a $ fixes that

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

    Anyone wondering why $ has been added? Try doing the dry run for this test case with and without adding $
    s = "aaaa"

  • @majidshaikh5913
    @majidshaikh5913 2 роки тому +2

    Deep Dive Explaination. Great Work!

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

    finally understood lps O(n) algo...Thanks a lot

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

    Amazing Explanation!

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

    first must intuition be told not directly jumped to solution.

  • @YogeshPorwal-zl9lh
    @YogeshPorwal-zl9lh Рік тому

    great!