Skip to content

Commit a046e41

Browse files
committed
Find Minimum Operations to Make All Elements Divisible by Three 👕
1 parent 19b3e93 commit a046e41

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
var minimumOperations = function(nums) {
2+
let operations = 0;
3+
4+
for (let x of nums) {
5+
if (x % 3 !== 0) operations += 1;
6+
}
7+
8+
return operations;
9+
};
10+

0 commit comments

Comments
 (0)