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();
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:I would have liked you to instead have one test for
assert_eq!(b, 0)and one forassert_eq!(b, 1).Sad spagetti: