JAVA_Long Pressed Name_LeetCode 925


JAVA_Long Pressed Name_LeetCode 925

JAVA_Long Pressed Name_LeetCode 925 풀이 class Solution { public boolean isLongPressedName(String name, String typed) { int num = 0; for(int i = 0; i < typed.length(); i++){ if(num < name.length() && name.charAt(num) == typed.charAt(i)) num++; else if(i == 0 || typed.charAt(i) != typed.charAt(i-1)) return false; } return num == name.length(); } } * 출처 https://leetcode.com/problems/long-pressed-name/ Long Pressed Name - LeetCode Can you solve this real interview question? Long Pressed Name - Your f...


#JAVA #JAVA_LeetCode925 #JAVA_LongPressedName #JAVA_LongPressedName_LeetCode925 #LongPressedName_LeetCode925

원문링크 : JAVA_Long Pressed Name_LeetCode 925