Greedy Algorithm And Dynamic Programming Python Code For Snake