DP #714 Best Time to Buy and Sell Stock with Transaction Fee
Jun 9, 2024 · 2 min read · class Solution { public int maxProfit(int[] prices, int fee) { int n = prices.length; // int[][] dp = new int[n][2]; // for (int[] r : dp) // Arrays.fill(r, -1); // return recur(0, 1, prices, n, fee, dp); ...
Join discussion