We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7075b0d commit 8370d82Copy full SHA for 8370d82
src/main/js/com_github_leetcode/treenode.js
@@ -1,4 +1,4 @@
1
-class TreeNode {
+class TreeNode { // NOSONAR
2
constructor(val = 0, left = null, right = null) {
3
this.val = val
4
this.left = left
src/main/js/g0001_0100/s0075_sort_colors/solution.js
@@ -11,10 +11,10 @@ var sortColors = function(nums) {
11
let ones = 0
12
13
// Count 0s and place them at the start
14
- for (let i = 0; i < nums.length; i++) {
15
- if (nums[i] === 0) {
+ for (let num of nums) {
+ if (num === 0) {
16
nums[zeroes++] = 0
17
- } else if (nums[i] === 1) {
+ } else if (num === 1) {
18
ones++
19
}
20
0 commit comments