少了一个: package com.code; import java.util.Arrays; public class Test03_2 { public static int solution(int[] A) { // write your code in Java SE 8 Arrays.sort(A); int size = A.length; if(size==0){ return 1; } if(size==1){ return A[0]==1?2:1; } if(A[size-…
import org.apache.commons.dbutils.handlers.BeanListHandler;这个包,BeanListHandler让我发现List<Friend> list = (List<Friend>) runner.query(sql, new BeanHandler<Friend>(Friend.class),username);里的new BeanHandler<Friend>(Friend.class)是错误的,应该:n…
作者: 负雪明烛 id: fuxuemingzhu 个人博客:http://fuxuemingzhu.cn/ 目录 题目描述 题目大意 解题方法 遍历 日期 题目地址:https://leetcode-cn.com/problems/missing-element-in-sorted-array/ 题目描述 Given a sorted array A of unique numbers, find the K-th missing number starting from the leftmo…
原题链接在这里:https://leetcode.com/problems/missing-element-in-sorted-array/ 题目: Given a sorted array A of unique numbers, find the K-th missing number starting from the leftmost number of the array. Example 1: Input: A = [4,7,9,10], K = 1 Output: 5 Explan…