An algorithm that finds the ideal multiplication of a given set of matrices in order to optimize computing time.
SETUP: In data.txt, put the number of matrices on one row, and then the dimensions of each matrix on the following n lines. The program will find the optimal multiplication order of these matrices.