We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
The problem is find the sum of the palindromic PROPER borders no repeated in a subtring in a string.
PROPER means that the border is a prefix and also a suffix
Explaning the examples:
ababa=5
aba=1------>a
ababa=2----->a,aba
aba=1
bab=1------->b
aaaa=10
aa=1x3-------->a
aaa=2x2------->a,aa
aaaa=3-------->a,aa,aaa
abcacb=3
abca=1-------->a
bcacb=1------->b
cac=1--------->c
note that all the substrings have the same prefin and suffix
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Palindromic Border
You are viewing a single comment's thread. Return to all comments →
The problem is find the sum of the palindromic PROPER borders no repeated in a subtring in a string. PROPER means that the border is a prefix and also a suffix Explaning the examples: ababa=5 aba=1------>a ababa=2----->a,aba aba=1 bab=1------->b aaaa=10 aa=1x3-------->a aaa=2x2------->a,aa aaaa=3-------->a,aa,aaa abcacb=3 abca=1-------->a bcacb=1------->b cac=1--------->c note that all the substrings have the same prefin and suffix