Wells Fargo Interview Question

One recursion/dp based question and design valorant.