HackerRank - Repeated String | Full Solution with Simplified Examples and Visuals | Study Algorithms

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

КОМЕНТАРІ • 22

  • @shruthibudidha5508
    @shruthibudidha5508 5 місяців тому

    great and clear explanation sir!!Thank you so much sir
    Not only this sir,each and every video was awesome and easily understandable

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

    Really clear explanation.
    Definitely helped to understand this interesting HackerRank problem and the optimal solution.
    Many thanks!!

  • @C__janhaviKadam
    @C__janhaviKadam 5 місяців тому

    crisp and clear ! thankss

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

    No one can explain like you ☺

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

    bro you're just amazing👌👌.we want this type of teaching.

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

    Great explanations, thank you

  • @Lion-st5g3s378
    @Lion-st5g3s378 3 роки тому +1

    10 out of 10 explanation 🌼️, tysm!

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

    Thank you Sir, you taught it very well.

  • @vaitheeswaranr2115
    @vaitheeswaranr2115 8 місяців тому

    StringLeftLength=n%strLength;
    Will be helpful?

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

    I love you man!

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

    Can you Please make it on Stock Span Problem

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

      Reach out to me on my email in channel description with the problem link.

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

    why is the time complexity O(1)? You have run the two loops in the code

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

      I guess it's because the loop is run for size of input string and not on N. I'm this case it's 5 which can be dropped to 0(1)

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

    Why can't we use this
    stringLeftLength=n%strLength;

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

    Sir....I tried the below code..
    #include
    #include
    using namespace std;
    int main()
    {
    long long int n,count=0;
    int length,i;
    string sub_str;
    getline(cin,sub_str);
    cin>>n;
    length = sub_str.length();
    if(length==1)
    {
    if(sub_str[i]=='a')
    {
    count=n;
    }
    else
    {
    count=0;
    }
    }
    // finding number of a's in substring
    else if(length>1)
    {
    for(i=0;i

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

      Try looking at the test cases I have in my code and debug your code with those cases.
      Maybe you can catch the problem

  • @spencersedano
    @spencersedano 3 місяці тому

    how is this an easy question

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

    It still wasn't clear

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

      Which part did you face a problem at? I can try to elaborate

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

    Shouldn't you `Math.floor(n / sLength)` the number of reps?