Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit913925c

Browse files
refactor 925
1 parentf2e1c3e commit913925c

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

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,5 @@
11
packagecom.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
publicclass_925 {
404
publicstaticclassSolution1 {
415
publicbooleanisLongPressedName(Stringname,Stringtyped) {

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp