This commit is contained in:
Rorik Star Platinum 2025-12-04 15:38:26 +03:00
parent 62d1558abe
commit 498f64b5cd
3 changed files with 35 additions and 24 deletions

View file

@ -11,7 +11,7 @@ pub fn frequency(input: &[&str], worker_count: usize) -> HashMap<char, usize> {
thread::scope(|s| {
let chunk_size = input.len().div_ceil(worker_count);
let mut handles: Vec<_> = input
let handles: Vec<_> = input
.chunks(chunk_size)
.map(|chunk| {
s.spawn(move || {