Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on Where Everything Went Wrong: Error Handling and Error Messages in Rust (2020). Parent comment
(in the context of walking a tree...):
fn get_depth(root_opt: &Option<Box<TreeNode>>) -> usize { let root = match root_opt { Some(root) => root, None => return 0; }; 1 + std::cmp::max(get_depth(root.borrow().left), get_depth(root.borrow().right)) }
There are no comments on this comment yet.
(in the context of walking a tree...):