消息推送Leetcode每日一题 —— 1267. 统计参与通信的服务器7小时前Leetcode每日一题 —— 1267. 统计参与通信的服务器🌐 链接: https://linux.do/t/topic/3138800🏷️ 分组: LinuxDo论坛🕒 时间: 2026-11-08 08:34:34 LINUX DO Leetcode每日一题 —— 1267. 统计参与通信的服务器 思路 简单题。第一遍循环找出同行同列的值,只要该值>1就是参与通信的,第二遍循环找出参与通信的服务器。 代码 class Solution { public int countServers(int[][] grid) { int m = grid.length; int n = grid[0].length; int[] row = new int[m]; int[] col = new int[n]; for (int… 7小时前