From 1a977d697ee0713647beb08a95f8f1236b6b0d9c Mon Sep 17 00:00:00 2001 From: Won Joon Thomas Choi <113500771+724thomas@users.noreply.github.com> Date: Sun, 20 Sep 2026 20:58:37 +0900 Subject: [PATCH 1/2] Create 1665. Minimum Initial Energy to Finish Tasks.py --- .../1665. Minimum Initial Energy to Finish Tasks.py" | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 "leetcode3/\354\265\234\354\233\220\354\244\200/1665. Minimum Initial Energy to Finish Tasks.py" diff --git "a/leetcode3/\354\265\234\354\233\220\354\244\200/1665. Minimum Initial Energy to Finish Tasks.py" "b/leetcode3/\354\265\234\354\233\220\354\244\200/1665. Minimum Initial Energy to Finish Tasks.py" new file mode 100644 index 000000000..7ca3a2b2e --- /dev/null +++ "b/leetcode3/\354\265\234\354\233\220\354\244\200/1665. Minimum Initial Energy to Finish Tasks.py" @@ -0,0 +1,12 @@ +class Solution: + def minimumEffort(self, tasks: list[list[int]]) -> int: + tasks.sort(key=lambda x: x[1] - x[0], reverse=True) + + ans = 0 + curr = 0 + + for actual, minimum in tasks: + ans = max(ans, curr + minimum) + curr += actual + + return ans From 1a16e0f4ebb336fa592fab41e5db4f2bb5c588fe Mon Sep 17 00:00:00 2001 From: Won Joon Thomas Choi <113500771+724thomas@users.noreply.github.com> Date: Sun, 20 Sep 2026 20:59:01 +0900 Subject: [PATCH 2/2] =?UTF-8?q?Rename=20leetcode3/284.=20Peeking=20Iterato?= =?UTF-8?q?r.py=20to=20leetcode3/=EC=B5=9C=EC=9B=90=EC=A4=80/284.=20Peekin?= =?UTF-8?q?g=20Iterator.py?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../284. Peeking Iterator.py" | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename leetcode3/284. Peeking Iterator.py => "leetcode3/\354\265\234\354\233\220\354\244\200/284. Peeking Iterator.py" (100%) diff --git a/leetcode3/284. Peeking Iterator.py "b/leetcode3/\354\265\234\354\233\220\354\244\200/284. Peeking Iterator.py" similarity index 100% rename from leetcode3/284. Peeking Iterator.py rename to "leetcode3/\354\265\234\354\233\220\354\244\200/284. Peeking Iterator.py"