[Python3, Java, C++] Simple O(mn)
Explanation:\nTo find the total number of laser beams we have to do 2 things:\n1. Find the number of laser beams between \'adjacent rows\'. A row here is consid
**Explanation**:\nTo find the total number of `laser beams` we have to do 2 things:\n1. Find the `number of laser beams` between \'adjacent rows\'. A row here is considered only if it has atleast 1 `security device`. Otherwise the row is simply ignored. \nThus if:                                   \nRow `1`: 3 security devices   \nRow `2`: 0 security devices    \nRow `3`: 2 security devices\nWe can ignore row `2` and say that row `1` is adjacent to row `3`. To find the `number of laser beams` between \'adjacent rows\' we can multiply the number of security devices in the first row of the pair to the number of security devices in the second row of the pair.\n2. Doing step 1 only solves a part of the problem. We now need to find the sum of all the `laser beams` from each pair of \'adjacent rows\'.\n\n**Algorithm**:\nFor each string in bank:\n* `count` = number of ones in string\n* Multiply `count` by the non-zero `count` of previous string and add it to `ans`\n<iframe src="https://leetcode.com/playground/CfnEimzJ/shared" frameBorder="0" width="500" height="275"></iframe>\n\nTime Complexity: `O(mn)`, `m` = length of bank, `n` = length of string
['C', 'Java', 'Python3']