Solved longest_common_subsequence and longest_common_substring in C++

Signed-off-by: Ionut Radu <ihonius@gmail.com>