MCPcopy Index your code
hub / github.com/neetcode-gh/leetcode / paintWalls

Method paintWalls

java/2742-painting-the-walls.java:3–7  ·  view source on GitHub ↗
(int[] cost, int[] time)

Source from the content-addressed store, hash-verified

1class Solution {
2 Map<String, Integer> dp;
3 public int paintWalls(int[] cost, int[] time) {
4 int n = cost.length;
5 dp = new HashMap<>();
6 return dfs(0, cost.length, cost, time);
7 }
8 private int dfs(int i, int remain, int[] cost, int[] time){
9 if(remain <= 0)
10 return 0;

Callers

nothing calls this directly

Calls 1

dfsMethod · 0.95

Tested by

no test coverage detected