2 parents cea0911 + 754ae63 commit 2a96f89Copy full SHA for 2a96f89
1 file changed
leetcode3/황은지/403. Frog Jump.js
@@ -0,0 +1,19 @@
1
+/**
2
+ * @param {number[]} stones
3
+ * @return {boolean}
4
+ */
5
+var canCross = function(stones) {
6
+ const dp =Array.from({length:stones.length},()=>Array(3).fill(false));
7
+ dp[1][1]=true;
8
+
9
+// 길이는 전길이에 따라 달라짐
10
+ for(let i=0;i<stones.length-1;i++){
11
+ const pos=stones[i];
12
+ for(let j=0;j<3;j++){
13
+ if(dp[i][j]===true){
14
+ }
15
16
17
18
+ return true;
19
+};
0 commit comments