c - What is the complexity of the following simple program? -
i having trouble finding understanding complexity. me understand complexity of code below , why.
for (int = 1; < n; i++) { // (n number chosen user) (int j = - 1; j >= 0; j--) { printf("i=%d, j=%d", i, j); } }
an explanation great.
assuming starts @ 0, complexity constant. complexity expressed relative variable defining number of executions, not case here.
if 1 term should used describe behavior, "constant". there number of executions, number never change
Comments
Post a Comment