@Carols10cents this is literally an example in Rust's top level collection docs: https://doc.rust-lang.org/std/collections/#counting-the-number-of-times-each-character-in-a-string-occurs …
-
-
@Carols10cents Can I submit the Rust one for "fastest"? ;) -
@Gankro NO! cheater!
- 4 more replies
New conversation -
-
-
@Carols10cents For reference: let mut m = HashMap::new(); for x in arr { *m.entry(x).or_insert(0) += 1; }; m -
@Gankro m does not live long enough
- 3 more replies
New conversation -
-
-
@Carols10cents I will note@steveklabnik's solution is basically the Rust one, suggesting he has lost his way, and Rust is truly his master.Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
@Carols10cents I have no idea what to derive from this fact, honestly.Thanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.