Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pass #2

Open
violaso opened this issue May 27, 2022 · 0 comments
Open

Pass #2

violaso opened this issue May 27, 2022 · 0 comments

Comments

@violaso
Copy link

violaso commented May 27, 2022

Very well done Felix!

Yeah, your are right. Your tree is not only slow, but lack functions such as size. These tests are also interestingly named:

#[test]
fn tree_is_balanced() {
    //...
    assert_eq!(b, 0);
}

#[test]
fn tree_is_really_balanced() {
    //...
    assert_eq!(b, 0);
}

I would have liked you to instead have one test for assert_eq!(b, 0) and one for assert_eq!(b, 1).

Sad spagetti:

// get input lines as iterative
//let lines: Vec<String> = input
//    .lock()
//    .lines()
//    .map(|_line| _line.ok().unwrap())
//    .collect();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant