Here is my (non working) code: publicintshortestSubarray(int[]A,intK){intptr=0;intsum=0;intsol=Integer.MAX_VALUE;for(inti=0;i<A.length;++i){sum+=A[i];while(sum>=K){sol=Math.min(sol,i-ptr+1);sum-=A[ptr++];}}return(sol==Integer.MAX_VALUE)?-1:sol;} and. My bad! Rep...