摘要:
219. 存在重复元素 II Solution 思路1: 重复元素 然后就用HashMap不断更新最新出现的位置 与k值判断即可。 class Solution { public boolean containsNearbyDuplicate(int[] nums, int k) { Map<Int 阅读全文
摘要:
539. 最小时间差 Solution 思路: 将所有时间字符串排序后 最小时间只可能是 前后相邻时间 和 首位时间。1440可以剪枝处理,因为24*60。 class Solution { public int findMinDifference(List<String> timePoints) 阅读全文