Skip to content

Beta · Data may be lost.Your data may be reset or lost.

GateBrew
← GATE CSE 2017 Set 2
Questions

Q38

MCQ2 marks, −0.67Algorithms

Consider the following C function

int fun(int n) {
    int i, j;
    for(i=1; i<=n; i++) {
        for (j=1; j<n; j+=i) {
            printf("%d %d", i, j);
        }
    }
}

Time complexity of funfun in terms of Θ\Theta notation is

Sign in to save attempts.

Solutions and discussion are hidden while you attempt this question. They open once you check or show the answer.