Check if two Strings are K Anagrams | Hashmap Interview Questions Playlist

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

КОМЕНТАРІ • 14

  • @ravitiwari2160
    @ravitiwari2160 3 роки тому

    Hey, Thank you so much all your knowledge sharing. I am able to perform very nice in all my interviews. Keep up the good work. More power to you.
    Keep rocking!!!

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

    I believe we need to remove the key from the map when the value = 0 after subtraction. Otherwise, it will affect the count that is calculated later.

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

      Do this instead
      for(auto i : m)
      count += abs(i.second);
      if(count

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

      no it will not as 0 will be added in the sum

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

    Mast solution hai so easy to implement

  • @AmanKumar-ht8xi
    @AmanKumar-ht8xi 4 роки тому +1

    Mza aa gya sir..

  • @MohitSharma-rz1uq
    @MohitSharma-rz1uq 2 роки тому

    What if the question is about shifting.....that is you can shift position of elements in a string to make both strings same

  • @codeblooded6760
    @codeblooded6760 3 роки тому +5

    7:56 Sandeep Maheshwari🤣🤣🤣

  • @somith16
    @somith16 4 роки тому

    Bhaiya will u solve next permutations question

  • @varunsinghal5641
    @varunsinghal5641 3 роки тому

    bool areKAnagrams(string str1, string str2, int k)
    {
    if(str1.length()> str2.length() || str1.length()second-minimum_f;
    its->second= its->second-minimum_f;

    }
    }
    for(auto x:m1){
    count = count+x.second;
    }
    if(count

  • @aman6561
    @aman6561 4 роки тому

    kaafi khud se hogya tha ye.