From ccaf0e09983bd37b5a26a87231abff765df66788 Mon Sep 17 00:00:00 2001 From: jeongyunjae Date: Thu, 31 Jul 2025 00:47:29 +0900 Subject: [PATCH 1/2] [main] valid anagram solution --- valid-anagram/jeongyunjae.py | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 valid-anagram/jeongyunjae.py diff --git a/valid-anagram/jeongyunjae.py b/valid-anagram/jeongyunjae.py new file mode 100644 index 000000000..dafd47bfd --- /dev/null +++ b/valid-anagram/jeongyunjae.py @@ -0,0 +1,6 @@ +class Solution: + def isAnagram(self, s: str, t: str) -> bool: + sort_s = ''.join(sorted(s)) + sort_t = ''.join(sorted(t)) + + return sort_s == sort_t From 9e576b8a115e819abbe789bcc1f9d868939213c7 Mon Sep 17 00:00:00 2001 From: jeongyunjae Date: Sat, 2 Aug 2025 21:33:00 +0900 Subject: [PATCH 2/2] [main] climbStairs solution --- climbing-stairs/jeongyunjae.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 climbing-stairs/jeongyunjae.py diff --git a/climbing-stairs/jeongyunjae.py b/climbing-stairs/jeongyunjae.py new file mode 100644 index 000000000..ef22b1c21 --- /dev/null +++ b/climbing-stairs/jeongyunjae.py @@ -0,0 +1,12 @@ +class Solution: + def climbStairs(self, n: int) -> int: + dp = [-1] + + for i in range(1,n+1): + if i == 1 or i == 2: + dp.append(i) + continue + + dp.append(dp[i-1] + dp[i-2]) + + return dp[n]