消息推送Leetcode每日一题 —— 1385. 两个数组间的距离值3小时前Leetcode每日一题 —— 1385. 两个数组间的距离值🌐 链接: https://linux.do/t/topic/3124233🏷️ 分组: LinuxDo论坛🕒 时间: 2026-11-05 08:52:23 LINUX DO Leetcode每日一题 —— 1385. 两个数组间的距离值 思路 排序+双指针可能很好,但我选择模拟! 代码 class Solution { public int findTheDistanceValue(int[] arr1, int[] arr2, int d) { int ans = 0; for (int x : arr1) { boolean flag = true; for (int y : arr2) { if (Math.abs(x… 3小时前