3212. Count Submatrices With Equal Frequency of X and Y | Weekly Leetcode 405

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

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

  • @quyhoaphantruong7453
    @quyhoaphantruong7453 4 месяца назад +1

    Love you sir😍. Learning from you for 1 years and a half, my leetcode rating go from top 77% to 18% (from be able to solve 1 question to 3 questions) :))

  • @priyanshkumar17
    @priyanshkumar17 4 месяца назад +1

    Thanks for very intuitive solution bhaiya!! Studied about 2D prefix sum application for the very first time

  • @ashmitaroy797
    @ashmitaroy797 4 месяца назад

    great explanation

  • @souravshaw8904
    @souravshaw8904 4 месяца назад +1

    Nice explanation 💯

  • @k-CE-OmkarPathak
    @k-CE-OmkarPathak 4 месяца назад

    Well Explained

  • @gigachad2419
    @gigachad2419 4 месяца назад +1

    weekly 4th?
    What is Rolling Hash and how is it paired with dp?

    • @codingmohan
      @codingmohan  4 месяца назад

      Basically it's just prefix sum with hashing.
      I have explained that multiple times in different weekly contest problems. Search for hashing and you'll get it.
      I am facing difficulty in getting my hashing solution accepted because TC is too strict. Do you see any accepted rolling hash solution?
      PS: When I see solution of others, most of them will not survive various scenarios. I've contributed a test case to LC, if they merge it then they might relax the time constraint a bit as well.

    • @gigachad2419
      @gigachad2419 4 месяца назад

      @@codingmohan no sir I haven't found any rolling hash solutions.
      But i still don't understand why Trie+DP won't work.
      What edge case does it fail in.
      And when we check for the hints of this question, LeetCode still says try Tries+DP.
      Does this indicate Trie+DP will be considered as valid for the contest?

    • @codingmohan
      @codingmohan  4 месяца назад

      Here is the solution - ruclips.net/video/0ErpIxK9QUI/видео.html

    • @gigachad2419
      @gigachad2419 4 месяца назад +1

      @@codingmohan tysm sir

  • @AryanAryan-ks5ib
    @AryanAryan-ks5ib 4 месяца назад

    sir in the third row the prefix sum is 2 or is it 3 am i making a mistake on calculating that;here are the timestamps that i am talking about 13:38

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

    Bhaiya kalka 4th question disscus karo please

    • @codingmohan
      @codingmohan  4 месяца назад

      Here you go - ruclips.net/video/DTDUlIfPzRE/видео.html

    • @krishanusaha5212
      @krishanusaha5212 4 месяца назад +1

      @@codingmohan thanks bhaiya

    • @priyanshkumar17
      @priyanshkumar17 4 месяца назад

      He has just uploaded

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

    Bhaiya kl ka 4th question plz❤

    • @codingmohan
      @codingmohan  4 месяца назад

      Here you go - ruclips.net/video/DTDUlIfPzRE/видео.html

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

      @@codingmohan a hug to u ❤️

    • @priyanshkumar17
      @priyanshkumar17 4 месяца назад

      He has just uploaded

  • @aayushsharma1697
    @aayushsharma1697 3 месяца назад

    Very well explained🙂