add dynamicProgram lcs and matrixChainOrder