摘要:
题目链接 395. 至少有 K 个重复字符的最长子串 思路 代码 class Solution { public int longestSubstring(String s, int k) { int ans = 0; int len = s.length(); char[] cs = s.toCh 阅读全文
摘要:
题目链接 278. 第一个错误的版本 思路 二分查找 代码 public class Solution extends VersionControl { public int firstBadVersion(int n) { int left = 1, right = n - 1; while (l 阅读全文
摘要:
题目链接 33. 搜索旋转排序数组思路 思路 都在注释里 代码 class Solution { public int search(int[] nums, int target) { int len = nums.length; if(len == 0){ return -1; } int lef 阅读全文