一. 思路 数组是升序的,可以用二分查找。 二. 代码 public class Solution { public int GetNumberOfK(int [] array , int k) { if (array == null || array.length == 0) return 0; int left = 0, right = array.length-1; int mid = 0, count = 0; while (left < right) { mid = (left+ri...