Breaking News: Grepper is joining You.com. Read the official announcement!
Check it out

what is the time complexity of fun()? int fun(int n) { int count = 0; for (int i = 0; i < n; i++) for (int j = i; j > 0; j--) count = count + 1; return count; }

Yassine Maraoui answered on April 6, 2022 Popularity 8/10 Helpfulness 1/10

Contents


More Related Answers

  • javascript function, for loops, linear time complexity
  • let suma =0; for(let i = 3; i <1000;i++){ if(Number.isInteger(i/3)|| Number.isInteger(i/5)){ suma = suma + i; } console.log(i); }

  • what is the time complexity of fun()? int fun(int n) { int count = 0; for (int i = 0; i < n; i++) for (int j = i; j > 0; j--) count = count + 1; return count; }

    0
    Popularity 8/10 Helpfulness 1/10 Language javascript
    Source: Grepper
    Link to this answer
    Share Copy Link
    Contributed on Apr 06 2022
    Yassine Maraoui
    0 Answers  Avg Quality 2/10


    X

    Continue with Google

    By continuing, I agree that I have read and agree to Greppers's Terms of Service and Privacy Policy.
    X
    Grepper Account Login Required

    Oops, You will need to install Grepper and log-in to perform this action.