Count Substrings without Repeating Characters | Hashmap Interview Questions

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

КОМЕНТАРІ • 25

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

    Thank you so much. Helped me a lot in building my intuition. 🙏

  • @priyankamishra5704
    @priyankamishra5704 2 роки тому +3

    Superb explanation!! Great teaching skills. Kudos to you!

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

    This same code is not being submitted on pepcoding platform !! Giving WA for sample test case.

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

    we can note that we can do this question by taking out all unique strings from largest substring of unique char question and length*(length+1)/2 to find all susbtring because many susbtring we make will be repeated when we start from j+1 char se start hone walo ka count
    so we use count of end char/i jaha pr hai se count ,as repeatition nhi hoga as char pehle baar aah rha hai and we count all susbstring ending with that char

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

    wonderful ..very very nicely explained ...superb ..you diserve 1 B views !!!

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

      Thank you. You like this? Help us get the views.

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

    ye to hogya tha one go me kaafi kraa die sir aap ne is type ke. to smjh aagya thi approach question pdh ke

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

    Sir, I am a student of Subesh sir. Can you please start the course on system design also for experienced developers?

  • @rohitshinde8478
    @rohitshinde8478 3 роки тому +1

    Thank you sir very much

  • @SumitSingh-ui4do
    @SumitSingh-ui4do 2 роки тому

    Wow ..great explanation ❤️❤️

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

      Glad you liked it.
      For better experience and well organised content explore nados.pepcoding.com

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

    instead of ans+=i-j ki jagah ans+=i-j+1 nhi hona chaiye ??

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

    so basically ive written a code which is different , it passes on pepcoding portal but i cant find any other online judge which has this question so i cannot confirm whether this passes all testcases or not , so if anyone can provide me a testcase where this code fails please reply
    public static int solution(String str) {
    int i =0;
    int j =0;
    int count = 0;
    HashMap map = new HashMap();
    while(i

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

    Request you to increase the frequency of your new videos!

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

    Sir please level 1 pahle complete kardijiye

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

      hanji 2 weeks mei kar dunga. thoda sa rehta hai wo

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

    C++ Much Concise and Easy to understand code using Set
    int minWindowCountSubstrings(string str) {
    int n = str.size();
    int result = 0;
    int i = 0, j = 0;
    set set;
    while (j < n) {
    while (set.count(str[j]) != 0) {
    set.erase(str[i]);
    i++;
    }
    set.insert(str[j]);
    result += (int)set.size();
    j++;
    }
    return result;
    }

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

    sir ye portal pe unlock kar dijiye

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

    u just taken "bc" 2 times in the above example

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

      because both of them are different. first bc is from different index and the second one is from different index