消息推送Leetcode每日一题 —— 3963. 构造恰好一条路径的网格2小时前Leetcode每日一题 —— 3963. 构造恰好一条路径的网格🌐 链接: https://linux.do/t/topic/3079291🏷️ 分组: LinuxDo论坛🕒 时间: 2026-10-27 09:03:58 LINUX DO Leetcode每日一题 —— 3963. 构造恰好一条路径的网格 思路 扫了一眼还以为是标准DP,结果仔细一看是构造。。。 直接把第一行和最后一列设为’.'即可。 代码 class Solution { public String[] createGrid(int m, int n) { String[] ans = new String[m]; StringBuilder sb = new StringBuilder(n); sb.repeat(".", n); ans[0] = sb.toString();… 2小时前