NeetCode #808LC-2125MediumGreedy
← Back to All Problems

#808 · #2125 · Number of Laser Beams in a Bank(银行中的激光束数量)

📌 Problem Statement & Constraints

A bank is represented as an m x n grid of strings where bank[i] describes row i: 1 is a security device and 0 is empty. A laser beam connects two devices on two different rows if no device lies between them. Return the total number of beams. Constraints: 1 <= m, n <= 500, each bank[i] contains only 0 and 1.
🔒

Sign In to Unlock Full Solutions for All 973 Problems

Sign in to access step-by-step logic, benchmark Python3 code, complexity breakdown, and offline export!