10 Replies Latest reply: Feb 25, 2009 12:33 AM by 843785 RSS

    complexity of an algorithm

    843785
      Hi guys,

      I don't know whether somebody can help me. I have 2 algorithms and I need to find their best and worst case in terms of the big O notation.

      The first 1 is:

      for(i = 0; i < = n; i++){
      for(j = 0; j < = n; j++){
      C[i,j] = A[i,j] + B[i,j]
      }
      }

      The second 1 is:

      while (n > = 1){