% Let's build a binary tree!
Let's build a binary tree of strings in Rust. To recap, each node in a binary tree:
- must have a value
- may or may not have left and/or right children
So we can describe a single node like this:
use std::fmt; | |
use std::boxed::Box; | |
use std::cmp::Ordering; | |
struct Tree<T> { | |
root: Option<Box<Node<T>>> | |
} | |
pub struct Node<T> { | |
left: Option<Box<Node<T>>>, |
% Let's build a binary tree!
Let's build a binary tree of strings in Rust. To recap, each node in a binary tree:
So we can describe a single node like this:
% Let's build a binary tree!
Let's build a binary tree of strings in Rust. To recap, each node in a binary tree:
So we can describe a single node like this:
Author: | Baiju Muthukadan |
---|---|
Email: | baiju.m.mail AT gmail.com |
Version: | 0.3.2 |
This simple script will take a picture of a whiteboard and use parts of the ImageMagick library with sane defaults to clean it up tremendously.
The script is here:
#!/bin/bash
convert $1 -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 $2