MCPcopy Create free account
hub / github.com/douchuan/algorithm / do_check

Function do_check

src/strings/palindrome.rs:6–11  ·  view source on GitHub ↗
(items: &[char])

Source from the content-addressed store, hash-verified

4}
5
6fn do_check(items: &[char]) -> bool {
7 match items {
8 [first, middle @ .., last] => first == last && do_check(middle),
9 [] | [_] => true,
10 }
11}

Callers 1

is_palindromeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected