-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Commit 68ca0ce
authored
merge: optimize the countVowels algo (#886)
* pref: optimize the count vowels algo
simplify the algo by using regex and String.prototype.match method, and modified the JS Doc
* fix: resolve all requests
* pref: optimize the algo by regex
ignore the useless traverse in best case by the help of regex and String.prototype.replace method
* test: add four new test cases
* Revert "test: add four new test cases"
This reverts commit 4609833.
* style: fromat with standard js1 parent 9911410 commit 68ca0ce
1 file changed
+7
-11
lines changedOriginal file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1 | 1 |
| |
2 | 2 |
| |
3 | 3 |
| |
4 | - | ||
5 | - | ||
4 | + | ||
5 | + | ||
6 | 6 |
| |
7 | 7 |
| |
8 | 8 |
| |
| |||
11 | 11 |
| |
12 | 12 |
| |
13 | 13 |
| |
14 | - | ||
15 | - | ||
16 | - | ||
17 | - | ||
18 | - | ||
19 | - | ||
20 | - | ||
21 | - | ||
22 | - | ||
14 | + | ||
15 | + | ||
16 | + | ||
17 | + | ||
18 | + | ||
23 | 19 |
| |
24 | 20 |
| |
25 | 21 |
|
0 commit comments