NeetCode #560LC-1267MediumGraphs
← Back to All Problems

#560 · #1267 · Count Servers that Communicate(统计参与通信的服务器)

📌 Problem Statement & Constraints

You are given an m x n grid where 1 is a server. Two servers communicate if they are in the same row or column. Return the number of servers that communicate with at least one other. Constraints: 1 <= m, n <= 250.
🔒

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!