I have a problem where a string for eg. "dancing"
is given and two indexes n=3,m=10
is given. We have to check whether the char at both index is same.
Which is true in this case when the string is repeated as [dancingdancing]
. The 3rd and 10th character is n
. How do I solve this in java
?