algorithms lab

ran out of time and wasn't able to figure out most of it