Skip to content

Pass #2

@violaso

Description

@violaso

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();

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions