MCPcopy Create free account
hub / github.com/StudyRust/leetcode_rust / is_palindromic

Function is_palindromic

647-palindromic-substrings.rs:2–8  ·  view source on GitHub ↗
(cs: &[char])

Source from the content-addressed store, hash-verified

1pub fn count_substrings(s: String) -> i32 {
2 pub fn is_palindromic(cs: &[char]) -> bool {
3 // println!("{:?}", cs.clone().to_vec());
4 let tmp = cs.clone().to_vec();
5 let mut tmp_rev = cs.clone().to_vec();
6 tmp_rev.reverse();
7 tmp == tmp_rev
8 }
9 let cs = s.chars().collect::<Vec<char>>();
10 let mut ret = 0;
11 for i in 1 ..= s.len() {

Callers 1

count_substringsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected