Why BitSet & BitVec are not in std::collections?

Unable to use bit_set to solve problems in Codeforces. I know this has be removed long back but why is it removed from the standard collections? Using bit sets we can optimize algorithm.

Would it be a nice to have a dedicated module for Competitive Rust programmers in standard library.
I hope it includes scanning stdIn like below code (which I have taken from codeforces) & all important collections.

use std::io::{BufWriter, stdin, stdout, Write};

struct Scanner {
    buffer: Vec<String>
impl Scanner {
    fn next<T: std::str::FromStr>(&mut self) -> T {
        loop {
            if let Some(token) = self.buffer.pop() {
                return token.parse().ok().expect("Failed parse");
            let mut input = String::new();
            stdin().read_line(&mut input).expect("Failed read");
            self.buffer = input.split_whitespace().rev().map(String::from).collect();

It would be nice, if someone was able to iron out the API of this module and stabilize it forever. If no one is going to do this, well, almost any use of Rust involves Cargo and crates.io anyway, so there's little harm of something being only in external crate.

1 Like

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.