Question on Suffix Array

https://www.hackerrank.comt/contests/w7/challenges/string-function-calculation

There’s a typo in link 2.