摘要:
连接所有点的最小费用 class Solution { public int minCostConnectPoints(int[][] points) { //prim算法,时间复杂度 n^2 int res = 0, n = points.length; int[][] g = new int[n 阅读全文
摘要:
最小覆盖子串 class Solution { public String minWindow(String s, String t) { int[] a = new int[128]; for (char ch : t.toCharArray()) { a[ch]++; } int[] b = n 阅读全文
摘要:
参考 穿上衣服我就不认识你了?来聊聊最长上升子序列 主要是找出最多独立的区间 最长递增子序列 这是一切开始的地方 class Solution { public int lengthOfLIS(int[] nums) { int n = nums.length, len = 0; int[] tai 阅读全文