add knapsack problem

add lcs naive logic