Well now I'm actually using the hash map that gives me dynamic programming