From 834be45d0200409bfab9442addb6e26af1c2f2c1 Mon Sep 17 00:00:00 2001 From: Jinyoung Jeong <80400463+jyoung2419@users.noreply.github.com> Date: Thu, 17 Sep 2026 22:40:26 +0900 Subject: [PATCH 1/2] Implement islandPerimeter function to calculate perimeter --- .../463. Island Perimeter" | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 "leetcode3/\354\240\225\354\247\204\354\230\201/463. Island Perimeter" diff --git "a/leetcode3/\354\240\225\354\247\204\354\230\201/463. Island Perimeter" "b/leetcode3/\354\240\225\354\247\204\354\230\201/463. Island Perimeter" new file mode 100644 index 000000000..d5c0d93bf --- /dev/null +++ "b/leetcode3/\354\240\225\354\247\204\354\230\201/463. Island Perimeter" @@ -0,0 +1,27 @@ +/** + * @param {number[][]} grid + * @return {number} + */ +var islandPerimeter = function(grid) { + let count = 0; + + for (let i = 0; i0 && grid[i][j-1] == 1){ + count -= 1; + } if (i>0 && grid[i-1][j] == 1){ + count -= 1; + } if (j Date: Thu, 17 Sep 2026 22:40:54 +0900 Subject: [PATCH 2/2] Add Mini Parser implementation and interface --- .../385. Mini Parser" | 51 +++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 "leetcode3/\354\240\225\354\247\204\354\230\201/385. Mini Parser" diff --git "a/leetcode3/\354\240\225\354\247\204\354\230\201/385. Mini Parser" "b/leetcode3/\354\240\225\354\247\204\354\230\201/385. Mini Parser" new file mode 100644 index 000000000..0ec6dd05b --- /dev/null +++ "b/leetcode3/\354\240\225\354\247\204\354\230\201/385. Mini Parser" @@ -0,0 +1,51 @@ +/** + * // This is the interface that allows for creating nested lists. + * // You should not implement it, or speculate about its implementation + * function NestedInteger() { + * + * Return true if this NestedInteger holds a single integer, rather than a nested list. + * @return {boolean} + * this.isInteger = function() { + * ... + * }; + * + * Return the single integer that this NestedInteger holds, if it holds a single integer + * Return null if this NestedInteger holds a nested list + * @return {integer} + * this.getInteger = function() { + * ... + * }; + * + * Set this NestedInteger to hold a single integer equal to value. + * @return {void} + * this.setInteger = function(value) { + * ... + * }; + * + * Set this NestedInteger to hold a nested list and adds a nested integer elem to it. + * @return {void} + * this.add = function(elem) { + * ... + * }; + * + * Return the nested list that this NestedInteger holds, if it holds a nested list + * Return null if this NestedInteger holds a single integer + * @return {NestedInteger[]} + * this.getList = function() { + * ... + * }; + * }; + */ +/** + * @param {string} s + * @return {NestedInteger} + */ +var deserialize = function(s) { + const stack = []; + let num = ""; + + for (let i = 0; i