India’s Best Job Seekers and Training Platform Forums Algorithm Solutions Discussion A string s3 consists of multiple repetitions …

  • A string s3 consists of multiple repetitions …

  • Akash 

    Administrator
    at

    A string s3 consists of multiple repetitions of s1.

    Given s1 and another string s2, find if s2 is a substring of s3.

    s3 = s1 + s1 + … + s1 = n * s1, where n is a positive integer 0.

    For example

    s1 = “aabc”, s2 = “caa” => true

    s1 = “aabc”, s2 = “cab” => false

    s1 = “aabc”, s2 = “caabcaa” =? true

Log in to reply.

Original Post
0 of 0 posts June 2018
Now
KodNest Training New Batch is starting on 19th October 2020. Attend one week free demo classes.Register Now

New Report

Close