| | | | | |

Algorithm Complexity - Loops

    for (i = 0; i < n; ++i)
    {
      // 3 atomics in loop body
    }
    
  • Complexity = Θ(3n) = Θ(n)

| | Top of Page | 3. Introduction to Algorithm Analysis - 17 of 23