Adds DP Rook algorithm