pofk_algorithm 0.0.3

A collection of efficient algorithms implemented in Rust for real-world projects.
Documentation
1
2
3
4
5
6
7
8
9
use pofk_algorithm::dp_algorithms::palindromic_substrings::palindromic_substrings;

#[test]
fn test_palindromic_substrings_large() {
    let s: Vec<char> = "aabaa".chars().collect();
    assert_eq!(palindromic_substrings(&s), 9);
    let s: Vec<char> = "a".repeat(100).chars().collect();
    assert_eq!(palindromic_substrings(&s), 5050);
}