Skip to content

Commit 7019087

Browse files
authored
Update Solution.kt
1 parent 2a93d87 commit 7019087

File tree

1 file changed

+1
-7
lines changed
  • src/main/kotlin/g0801_0900/s0809_expressive_words

1 file changed

+1
-7
lines changed

src/main/kotlin/g0801_0900/s0809_expressive_words/Solution.kt

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,7 @@ class Solution {
1717
private fun check(s: String, w: String): Boolean {
1818
var i = 0
1919
var j = 0
20-
/* Logic is to check whether character at same index of S and w are same
21-
if same,
22-
1. Find the consecutive number of occurrences of the char in S (say len1) and w ( say len2)
23-
2. If len1 == len 2 , move to the next char in S and w
24-
3. If len1 >= 3 and len2 < len1, means we can make the char in w stretchy to match len1
25-
4. else, return false, because it's not possible to stretch the char in w
26-
*/while (i < s.length && j < w.length) {
20+
while (i < s.length && j < w.length) {
2721
val ch1 = s[i]
2822
val ch2 = w[j]
2923
val len1 = getLen(s, i)

0 commit comments

Comments
 (0)