remove unnecessary static_cast
remove vector and replace it with the simple dynamic array
rewrite maximum_common_subseq function with a set of small functions.