Skip to content

JJessee1371/dynamic-programming

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dynamic Programming

Description

Practice problems to help me with a better understanding of how dynamic programming principles can greatly reduce the workload that a computer needs to handle in order to find solutions to given problems. Working through these problems also helps me gain a better understanding of time and space complexity and how to calucalte the change in each when memoization is implemented.

Memoization Best Practices

  • 1: Make it work. Get a working solution even at the cost of time
  • 2: Visualize the problem as a tree
  • 3: Implement the tree in the function using recursion
  • 4: Test the brute force recurstion solution
  • 5: Begin to make the solution more efficient
  • 6: Add a memo object to the function and include it in all recursive calls
  • 7: Add memo fetching logic with a base case to return its value
  • 8: Store the return values in the memo object after each recursion

About

Reducing time complexity of brute force algorithms with memoization

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors