1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
//! Anagram Checker (Generic, Hashable)
//!
//! Checks if two slices are anagrams (contain the same elements with the same frequencies).
//!
//! # Type Parameters
//! * `T`: The element type. Must implement `Eq` + `Hash`.
//!
//! # Arguments
//! * `a` - The first slice.
//! * `b` - The second slice.
//!
//! # Returns
//! * `bool` - True if the slices are anagrams, false otherwise.
//!
//! # Example
//! ```rust
//! use pofk_algorithm::set_algorithms::anagram_checker::anagram_checker;
//! let a = ["a", "b", "c"];
//! let b = ["c", "b", "a"];
//! assert!(anagram_checker(&a, &b));
//! let c = ["a", "b", "b"];
//! assert!(!anagram_checker(&a, &c));
//! ```
use HashMap;