From ae8f054880b5f89880531ba20487bdbc763f9d34 Mon Sep 17 00:00:00 2001 From: NISHANT Date: Mon, 14 Oct 2024 10:43:05 +0530 Subject: [PATCH] Create bowling_dp.py --- dynamic_programming/bowling_dp.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 dynamic_programming/bowling_dp.py diff --git a/dynamic_programming/bowling_dp.py b/dynamic_programming/bowling_dp.py new file mode 100644 index 000000000000..ade627695258 --- /dev/null +++ b/dynamic_programming/bowling_dp.py @@ -0,0 +1,15 @@ +#solves the last dp problem of first lecture of mit 6.0006 latest lectures +def solve(v, i): + score = 0 + if i >= len(v): + return 0 + else: + if i