v-O_O-v's blog

By v-O_O-v, history, 5 years ago, In English

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
  • Vote: I like it
  • +5
  • Vote: I do not like it

| Write comment?
»
5 years ago, # |
  Vote: I like it 0 Vote: I do not like it

This code is kcm1700's

  • »
    »
    5 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Sorry, I wrote the code without considering readability. This is kind of bucket sort.

»
5 years ago, # |
Rev. 2   Vote: I like it +9 Vote: I do not like it

I think its better for you to solve problems instead of learning data structures.

  • »
    »
    5 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Why?

    • »
      »
      »
      5 years ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      they don't help solve A B C div 2 (Even D div 2)

      • »
        »
        »
        »
        5 years ago, # ^ |
          Vote: I like it 0 Vote: I do not like it

        I don't just want to solve problems I want to learn how to solve problems efficiently.

        • »
          »
          »
          »
          »
          5 years ago, # ^ |
            Vote: I like it 0 Vote: I do not like it

          First you have to learn how to brute force a problem.

          • »
            »
            »
            »
            »
            »
            5 years ago, # ^ |
              Vote: I like it 0 Vote: I do not like it

            Does brute force always works in B and C problems. I don't think so.

            • »
              »
              »
              »
              »
              »
              »
              5 years ago, # ^ |
                Vote: I like it 0 Vote: I do not like it

              Binary search or some dp is needed most of the time and also set and map