MCPcopy Create free account
hub / github.com/TheAlgorithms/Rust / all_rotations

Function all_rotations

src/compression/burrows_wheeler_transform.rs:43–47  ·  view source on GitHub ↗

Generates all rotations of a string. # Arguments `s` - The string to rotate # Returns A vector containing all rotations of the input string # Examples ``` # use the_algorithms_rust::compression::all_rotations; let rotations = all_rotations("^BANANA|"); assert_eq!(rotations.len(), 8); assert_eq!(rotations[0], "^BANANA|"); assert_eq!(rotations[1], "BANANA|^"); ```

(s: &str)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 4

bwt_transformFunction · 0.85
test_all_rotations_casaFunction · 0.85

Calls 1

lenMethod · 0.45

Tested by 3

test_all_rotations_casaFunction · 0.68