Leetcode 438. Find All Anagrams in a String Daily Challenge | Sliding Window ,Hashing C++ Full Code

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

КОМЕНТАРІ • 23

  • @probabilitycodingisfunis1
    @probabilitycodingisfunis1  2 роки тому +4

    Code C++:
    if(s.size()

    • @saurabhchaudhari4157
      @saurabhchaudhari4157 4 місяці тому +1

      //Brute Force: Use 2 loops or substring concept
      //TC: O(n⋅klogk); SC:O(n+k)
      class Solution {
      public:
      vector findAnagrams(string s, string p) {
      int n=s.length();
      int k=p.length();
      sort(p.begin(),p.end());
      vectorans;
      for(int i=0;i

  • @venkatakalyan4953
    @venkatakalyan4953 6 днів тому

    Great Explanation. I Like the way you explain the problem in simple way👏.

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

    I like the trick you did with the char's to initialize the phash and shash map. I don't come from CS background so was unaware of the implicit conversion to int when doing char arithmetic - you used this to place the correct char in the relevant slot in the hash (vector). Then you get constant look up time. After I looked up char arithmetic and played around with it, now makes complete sense to me. That's what I like about C S - always something to learn ☺️

  • @AmanSharma-vb5jl
    @AmanSharma-vb5jl 2 роки тому +1

    Great previously I had confusion with this one.

  • @__.VikasJaiswal.__
    @__.VikasJaiswal.__ Рік тому

    Great explanation ! 💯💯

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

    Keep uploading daily leetcode solutions like this please

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

    Please upload a video on the problem given below🙏🙏
    424. Longest Repeating Character Replacement

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

    nice solution

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

    thankyou so much ma'am

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

    Way of approch u solve all the problems its very nice ... It's very simple & easy to understand ..
    #NITRR

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

    which keyboard you use ma'am? sound is really cool :)

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

    Tons of thanks ++

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

    Nice

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

    Same like you i see in iit bombay.

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

    Can you please suggest any good resources to learn graph?

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

      On youtube: Freecodecamp and Abdul Bari , On Udemy: Inside Code, through articles: Geeksforgeeks

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

      @@probabilitycodingisfunis1 Ohk thankss..

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

    Can you please suggest any good resources to learn graph and Dynamic programming?