Classic Dynamic Programming X

Very classic DP solution for this problem Climbing Stairs II - LeetCode with the typical hints: 1/ Min/Max problem 2/ Exponentially intractable with brute-force 3/ If you have the solutions for [0.....N-1], you can derive a formula for the solution for [N] One thing that you can do now that you have access to all LLM out there is to still continue to solve LC problems but use them to keep: A/ Improve your prompt engineering B/ Learn the capabilities of each of these models C/ Understand the solutions that they come up with, and how they might be different than yours My code is down below, along with the PROMPT used for the different models. Cheers, ACC. Code: public int ClimbStairs(int n, int[] costs) { int[] dp = new int[n + 1]; dp[0] = 0; for (int i = 1; i <= n; i++) { dp[i] = Int32.MaxValue; for (int j = 1; j <= 3; j++) { int indexFrom = i - j; int indexTo = i; if (indexFrom >= 0) ...