Skip to content

Commit

Permalink
m
Browse files Browse the repository at this point in the history
  • Loading branch information
qibinyi committed Apr 27, 2017
1 parent 7e3257d commit 995105e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions dev_notes/Algorithm_On_Strings.md
Original file line number Diff line number Diff line change
Expand Up @@ -1054,6 +1054,17 @@ This is all for the initialization phase of the suffix array construction. In ne
- Cᵢ̍ == CᵢC<sub>i+L</sub> -- concatenation of strings
- To compare Cᵢ̍ with Cⱼ̍ , it’s sufficient to compare Cᵢ with Cⱼ and C<sub>i+L</sub> with C<sub>j+L</sub>

![](https://raw.githubusercontent.com/mebusy/notes/master/imgs/algorithm_on_string_doubledCyclicShift_example1.png)

### Sorting pairs

Now we have to think about the following problem. We need to sort pairs of numbers basically. Because each cyclic shift of length L corresponds to its number of position in the order of all cyclic shifts of length L.

And we first need to sort by second element of pair, and then we stable sort by the first element of pair.

- First sort by second element of pair
- Then stable sort by first element of pair




Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 995105e

Please sign in to comment.