algorithms assignment