leetcode
去码头整点儿代码
这个作者很懒,什么都没留下…
展开
-
猜数字游戏leetcode-299
官方写法更简单class Solution { public String getHint(String secret, String guess) { char[] guessChars = guess.toCharArray(); int cow = 0; int bulls = 0; List<List<Integer>> positionList = new ArrayList<>();原创 2021-11-08 14:04:15 · 2293 阅读 · 0 评论 -
最接近的三数之和leetcode-16
这道题采用双指针class Solution { public int threeSumClosest(int[] nums, int target) { for (int m = 0; m < nums.length; m++) { for (int n = nums.length - 1; n > m; n--) { if (nums[n] < nums[m]) {原创 2021-11-08 11:48:29 · 64 阅读 · 0 评论