Skip to content

Commit 913925c

Browse files
refactor 925
1 parent f2e1c3e commit 913925c

File tree

1 file changed

+0
-36
lines changed
  • src/main/java/com/fishercoder/solutions

1 file changed

+0
-36
lines changed

src/main/java/com/fishercoder/solutions/_925.java

-36
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,5 @@
11
package com.fishercoder.solutions;
22

3-
/**
4-
* 925. Long Pressed Name
5-
*
6-
* Your friend is typing his name into a keyboard.
7-
* Sometimes, when typing a character c, the key might get long pressed,
8-
* and the character will be typed 1 or more times.
9-
*
10-
* You examine the typed characters of the keyboard.
11-
* Return True if it is possible that it was your friends name,
12-
* with some characters (possibly none) being long pressed.
13-
*
14-
* Example 1:
15-
*
16-
* Input: name = "alex", typed = "aaleex"
17-
* Output: true
18-
* Explanation: 'a' and 'e' in 'alex' were long pressed.
19-
* Example 2:
20-
*
21-
* Input: name = "saeed", typed = "ssaaedd"
22-
* Output: false
23-
* Explanation: 'e' must have been pressed twice, but it wasn't in the typed output.
24-
* Example 3:
25-
*
26-
* Input: name = "leelee", typed = "lleeelee"
27-
* Output: true
28-
* Example 4:
29-
*
30-
* Input: name = "laiden", typed = "laiden"
31-
* Output: true
32-
* Explanation: It's not necessary to long press any character.
33-
*
34-
* Note:
35-
* name.length <= 1000
36-
* typed.length <= 1000
37-
* The characters of name and typed are lowercase letters.
38-
* */
393
public class _925 {
404
public static class Solution1 {
415
public boolean isLongPressedName(String name, String typed) {

0 commit comments

Comments
 (0)