Different Algorithms In Dynamic Programming Problems