摘要: 问题: 给定一个二维数组, 求其中正方形区域,使得和<=阈值threshold的最长边长。 Example 1: Input: mat = [[1,1,3,2,4,3,2],[1,1,3,2,4,3,2],[1,1,3,2,4,3,2]], threshold = 4 Output: 2 Expla 阅读全文
posted @ 2020-07-05 10:59 habibah_chang 阅读(129) 评论(0) 推荐(0) 编辑
摘要: 问题: 给定n个汽车站之间的距离数组distances(相邻两个站相连,收尾站相连,可顺时针逆时针两个方向行驶) 求start站和destination站之间的最短距离。 Example 1: Input: distance = [1,2,3,4], start = 0, destination = 阅读全文
posted @ 2020-07-05 09:54 habibah_chang 阅读(205) 评论(0) 推荐(0) 编辑
摘要: 问题: 给定一组目标字符串数组 queries,和一个参照系字符串数组 words 求queries中的各个字符串:最小字符出现次数< words中最小字符出现次数的参照字符串的个数。 记字符串出现最小次数为函数fun Example 1: Input: queries = ["cbd"], wor 阅读全文
posted @ 2020-07-05 09:33 habibah_chang 阅读(124) 评论(0) 推荐(0) 编辑