Nội dung mới nhất bởi Khan

  1. K

    Calculate the running time in Big-O notation

    1 int sum=0; 2 long start = System.currentTimeMillis(); 3 for (int i = 1; i <= N; i++) { 4 for (int j = 1; j <= N; j++) { 5 sum=sum+1;}} 6 long stop = System.currentTimeMillis(); 7 long elapsed = (long)(stop - start); I am stuck on this question I know lines 1,2,5,6 and 7 are primitive...
Top