add answers for first two assignments

i just add my answers on my repo. this include solutions for first two assignments with example assignment

Same thing as comment below:

```scala
def weight(tree: CodeTree): Int = 
  tree match {
    case Leaf(_, w) => w
    case Fork(_, _, _, w) => w
  }
```