Search:

Type: Posts; User: std10093

Search: Search took 0.02 seconds.

  1. Replies
    8
    Views
    1,625

    We don't count the moment that the condition of...

    We don't count the moment that the condition of the loop fails, since the sequence of statements is not going to be executed at all ;)

    As for the English, make sure you keep up with this forum......
  2. Replies
    8
    Views
    1,625

    Let's solve it :) Σ[base:i=0, upperBound:i=N-1]...

    Let's solve it :)
    Σ[base:i=0, upperBound:i=N-1] Σ[base:j = i+1, upperBound:j = N-1] 1

    = Σ[base:i=0, upperBound:i=N-1] (N - 1 - i - 1 + 1) 1

    = Σ[base:i=0, upperBound:i=N-1] ( N - 1 - i )

    =...
  3. Replies
    8
    Views
    1,625

    The second one is true because of linearity... ...

    The second one is true because of linearity...

    The first one:

    j will take the value of i+1... As a result, it will start from value 1, when you meet the inner loop for first time... Then, when...
  4. Replies
    8
    Views
    1,625

    I thought you implied that this way of declaring...

    I thought you implied that this way of declaring a 2D array was incorrect.

    You are welcome :)

    PS - Χρόνια πολλά για την Εθνική μας εορτή!
  5. Replies
    8
    Views
    1,625

    Well, this goes out of bounds. But let's say we...

    Well, this goes out of bounds. But let's say we have i and j (the complexity won't change). When I say complexity, I mean time complexity.

    The complexity will be Ο(nē).
    Τhe explanation is as you...
Results 1 to 5 of 5