| | | | | |

Algorithm Complexity - Loops with Break

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

| | Top of Page | 1. Introduction to Algorithm Analysis - 18 of 23