File tree 2 files changed +8
-0
lines changed
2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change 82
82
| 414| [ 第三大的数] ( https://leetcode.cn/problems/third-maximum-number/ ) | [ JavaScript] ( ./algorithms/third-maximum-number.js ) | Easy|
83
83
| 442| [ 数组中重复的数据] ( https://leetcode.cn/problems/find-all-duplicates-in-an-array/ ) | [ JavaScript] ( ./algorithms/find-all-duplicates-in-an-array.js ) | Medium|
84
84
| 429| [ N 叉树的层序遍历] ( https://leetcode.cn/problems/n-ary-tree-level-order-traversal/ ) | [ JavaScript] ( ./algorithms/n-ary-tree-level-order-traversal.js ) | Medium|
85
+ | 434| [ 字符串中的单词数] ( https://leetcode.cn/problems/number-of-segments-in-a-string/ ) | [ JavaScript] ( ./algorithms/number-of-segments-in-a-string.js ) | Easy|
85
86
| 437| [ 路径总和 III] ( https://leetcode.cn/problems/path-sum-iii/ ) | [ JavaScript] ( ./algorithms/path-sum-iii.js ) | Medium|
86
87
| 453| [ 最小操作次数使数组元素相等] ( https://leetcode.cn/problems/minimum-moves-to-equal-array-elements/ ) | [ JavaScript] ( ./algorithms/minimum-moves-to-equal-array-elements.js ) | Easy|
87
88
| 448| [ 找到所有数组中消失的数字] ( https://leetcode.cn/problems/find-all-numbers-disappeared-in-an-array/ ) | [ JavaScript] ( ./algorithms/find-all-numbers-disappeared-in-an-array.js ) | Easy|
Original file line number Diff line number Diff line change
1
+ /**
2
+ * @param {string } s
3
+ * @return {number }
4
+ */
5
+ var countSegments = function ( s ) {
6
+ return s . split ( " " ) . filter ( ( val ) => val ) . length ;
7
+ } ;
You can’t perform that action at this time.
0 commit comments