We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ff226cb commit 9d0408bCopy full SHA for 9d0408b
javascript/2125-number-of-laser-beams-in-a-bank.js
@@ -16,12 +16,12 @@ var numberOfBeams = function(bank) {
16
return beam.split("").filter((b) => b === "1").length;
17
}
18
19
- while(right < bank.length) {
20
- while(right < bank.length && !countBeam(bank[right])) {
+ while (right < bank.length) {
+ while (right < bank.length && !countBeam(bank[right])) {
21
right++;
22
23
24
- if(right < bank.length) {
+ if (right < bank.length) {
25
totalBeams += countBeam(bank[left]) * countBeam(bank[right]);
26
27
left = right;
0 commit comments