File tree Expand file tree Collapse file tree 1 file changed +1
-7
lines changed
src/main/kotlin/g0801_0900/s0809_expressive_words Expand file tree Collapse file tree 1 file changed +1
-7
lines changed Original file line number Diff line number Diff 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)
You can’t perform that action at this time.
0 commit comments