So I was learning suffix array and how to implement it. I was not able to implement it myself so I took unused code for constructing suffix array I was able to understand the initial steps but was not able to understand what is happening after the 'Start' in code below. Please help me. Thanks.
Code
This code is kcm1700's
Sorry, I wrote the code without considering readability. This is kind of bucket sort.
I think its better for you to solve problems instead of learning data structures.
Why?
they don't help solve A B C div 2 (Even D div 2)
I don't just want to solve problems I want to learn how to solve problems efficiently.
First you have to learn how to brute force a problem.
Does brute force always works in B and C problems. I don't think so.
Binary search or some dp is needed most of the time and also set and map