From 6a941ed8dd59e5eca0975e391f8d2242441270bb Mon Sep 17 00:00:00 2001 From: Minkyeong-Choi Date: Tue, 29 Jul 2025 21:12:26 +0900 Subject: [PATCH 1/4] Lyla-Dev week2-tuesday --- climbing-stairs/LylaDev.java | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 climbing-stairs/LylaDev.java diff --git a/climbing-stairs/LylaDev.java b/climbing-stairs/LylaDev.java new file mode 100644 index 000000000..43e4e63e3 --- /dev/null +++ b/climbing-stairs/LylaDev.java @@ -0,0 +1,17 @@ +public class LylaDev { + public int climbStairs(int n) { + if (n == 1) { + return 1; + } + int[] dp = new int[n + 1]; + + dp[1] = 1; + dp[2] = 2; + + for (int i = 3; i <= n; i++) { + dp[i] = dp[i - 1] + dp[i - 2]; + } + + return dp[n]; + } +} From 9666671afe0a0bd8add83c3e403354ff3560b30e Mon Sep 17 00:00:00 2001 From: Minkyeong-Choi Date: Tue, 29 Jul 2025 21:41:16 +0900 Subject: [PATCH 2/4] Lyla-Dev week2-tuesday --- climbing-stairs/{LylaDev.java => Lyla-Dev.java} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename climbing-stairs/{LylaDev.java => Lyla-Dev.java} (92%) diff --git a/climbing-stairs/LylaDev.java b/climbing-stairs/Lyla-Dev.java similarity index 92% rename from climbing-stairs/LylaDev.java rename to climbing-stairs/Lyla-Dev.java index 43e4e63e3..a97dcfa1c 100644 --- a/climbing-stairs/LylaDev.java +++ b/climbing-stairs/Lyla-Dev.java @@ -1,4 +1,4 @@ -public class LylaDev { +class Solution { public int climbStairs(int n) { if (n == 1) { return 1; From b9dce6ad30967a1226c99bbb3d522ccd1cf8e6fe Mon Sep 17 00:00:00 2001 From: Minkyeong-Choi Date: Fri, 1 Aug 2025 16:25:13 +0900 Subject: [PATCH 3/4] week2-3 --- product-of-array-except-self/Lyla-Dev.java | 26 ++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 product-of-array-except-self/Lyla-Dev.java diff --git a/product-of-array-except-self/Lyla-Dev.java b/product-of-array-except-self/Lyla-Dev.java new file mode 100644 index 000000000..e25093f1d --- /dev/null +++ b/product-of-array-except-self/Lyla-Dev.java @@ -0,0 +1,26 @@ +class Solution { + public int[] productExceptSelf(int[] nums) { + int[] answer = new int[nums.length]; + int[] front = new int[nums.length]; + int[] back = new int[nums.length]; + + for (int i = 0; i < nums.length; i++) { + front[i] = 1; + back[i] = 1; + } + + for (int i = 0; i < nums.length - 1; i++) { + front[i + 1] = front[i] * nums[i]; + } + + for (int i = nums.length - 1; i > 0; i--) { + back[i - 1] = nums[i] * back[i]; + } + + for (int i = 0; i < nums.length; i++) { + answer[i] = front[i] * back[i]; + } + + return answer; + } +} \ No newline at end of file From f0e2b4b0b22f8597572121c188ed773a2851b5de Mon Sep 17 00:00:00 2001 From: Minkyeong-Choi Date: Fri, 1 Aug 2025 16:26:52 +0900 Subject: [PATCH 4/4] week2-3 resubmit --- product-of-array-except-self/Lyla-Dev.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/product-of-array-except-self/Lyla-Dev.java b/product-of-array-except-self/Lyla-Dev.java index e25093f1d..b32024690 100644 --- a/product-of-array-except-self/Lyla-Dev.java +++ b/product-of-array-except-self/Lyla-Dev.java @@ -23,4 +23,4 @@ public int[] productExceptSelf(int[] nums) { return answer; } -} \ No newline at end of file +}