Glass beads - How does Suffix array applied here?
问题 The problem statement for this problem can be found at this link - https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=24&page=show_problem&problem=660. When I first read the problem I just could not visualize how suffix array concept is applied in this question. I read the code from this link - https://yuting-zhang.github.io/uva/2016/03/22/UVa-719.html. If some one can take one small example and help me with the complete trace applying Suffix array and LCP concepts