Question 7

Given a string (1-d array) , find if there is any sub-sequence that repeats itself.
Here, sub-sequence can be a non-contiguous pattern, with the same relative order.
Eg:
1. abab < ——yes, ab is repeated. 2. abba < —- No, a and b follow different order 3. acbdaghfb <——– yes there is a followed by b at two places 4. abcdacb <—– yes a followed by b twice The above should be applicable to ANY TWO (or every two) characters in the string and optimum over time. In the sense, it should be checked for every pair of characters in the string.

[advanced_iframe securitykey=”undefined” src=”https://code.kodnest.com/” width=”100%” height=”600″]

Register for the new batch at KodNest and start your journey to success.Secure Your Spot Now!Claim Your Seat

Request A Callback

Get a Free 30-minute Counseling session with our experts.