CS 341 - Algorithm