From 003712e6be28514ad748d43db2673c8dc06909ed Mon Sep 17 00:00:00 2001 From: muncool39 Date: Wed, 17 Jun 2026 19:34:16 +0900 Subject: [PATCH 1/3] fix: Find the Index of the First Occurrence in a String MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 파일 잘못올려서 수정 --- .../Mun.java" | 30 ++++++++++--------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git "a/06\354\233\224/2\354\243\274\354\260\250/[LCD] Find the Index of the First Occurrence in a String/Mun.java" "b/06\354\233\224/2\354\243\274\354\260\250/[LCD] Find the Index of the First Occurrence in a String/Mun.java" index 571c4cc..0710cc9 100644 --- "a/06\354\233\224/2\354\243\274\354\260\250/[LCD] Find the Index of the First Occurrence in a String/Mun.java" +++ "b/06\354\233\224/2\354\243\274\354\260\250/[LCD] Find the Index of the First Occurrence in a String/Mun.java" @@ -1,18 +1,20 @@ -class Mun { - public int searchInsert(int[] nums, int target) { - int end = nums.length - 1; - int front = 0; - while(front <= end) { - int mid = (end + front) / 2; - int n = nums[mid]; - if(n > target) { - end = mid - 1; - } else if (n < target) { - front = mid + 1; - } else { - return mid; +class Solution { + public int strStr(String haystack, String needle) { + int len = needle.length(); + + for(int i=0;i Date: Wed, 17 Jun 2026 19:34:36 +0900 Subject: [PATCH 2/3] solve: Length of Last Word --- .../[LCD] Length of Last Word/Mun.java" | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 "06\354\233\224/3\354\243\274\354\260\250/[LCD] Length of Last Word/Mun.java" diff --git "a/06\354\233\224/3\354\243\274\354\260\250/[LCD] Length of Last Word/Mun.java" "b/06\354\233\224/3\354\243\274\354\260\250/[LCD] Length of Last Word/Mun.java" new file mode 100644 index 0000000..b6e1bcb --- /dev/null +++ "b/06\354\233\224/3\354\243\274\354\260\250/[LCD] Length of Last Word/Mun.java" @@ -0,0 +1,6 @@ +class Mun { + public int lengthOfLastWord(String s) { + String[] arr = s.split(" "); + return arr[arr.length-1].length(); + } +} \ No newline at end of file From 09a9d218125b225d0713e23c7a675cff9b5563c8 Mon Sep 17 00:00:00 2001 From: muncool39 Date: Wed, 17 Jun 2026 19:34:46 +0900 Subject: [PATCH 3/3] solve: Plus One --- .../[LCD] Plus One/Mun.java" | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 "06\354\233\224/3\354\243\274\354\260\250/[LCD] Plus One/Mun.java" diff --git "a/06\354\233\224/3\354\243\274\354\260\250/[LCD] Plus One/Mun.java" "b/06\354\233\224/3\354\243\274\354\260\250/[LCD] Plus One/Mun.java" new file mode 100644 index 0000000..d531680 --- /dev/null +++ "b/06\354\233\224/3\354\243\274\354\260\250/[LCD] Plus One/Mun.java" @@ -0,0 +1,14 @@ +class Mun { + public int[] plusOne(int[] digits) { + for(int i=digits.length-1;i>=0;i--) { + if(digits[i] < 9) { + digits[i]++; + return digits; + } + digits[i] = 0; + } + int[] ans = new int[digits.length+1]; + ans[0] = 1; + return ans; + } +} \ No newline at end of file