You are given a bank representing the floor plan of a bank, where $'0'$ represents an empty cell and $'1'$ represents a cell containing a security device.
A laser beam connects two security devices if and only if both conditions are satisfied:
The two devices are located on two distinct rows,
For every row
Laser beams function independently, meaning beams do not block or interfere with one another.
Return the total number of laser beams in the bank.
Constraints:
m bank.length
n bank[i].length
m, n
bank[i][j] is either $'0'$ or $'1'$
You are given a bank representing the floor plan of a bank, where $'0'$ represents an empty cell and $'1'$ represents a cell containing a security device.
A laser beam connects two security devices if and only if both conditions are satisfied:
The two devices are located on two distinct rows,
For every row
Laser beams function independently, meaning beams do not block or interfere with one another.
Return the total number of laser beams in the bank.
Constraints:
m bank.length
n bank[i].length
m, n
bank[i][j] is either $'0'$ or $'1'$