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

Popular posts from this blog

java - Run spring boot application error: Cannot instantiate interface org.springframework.context.ApplicationListener -

reactjs - React router and this.props.children - how to pass state to this.props.children -

Excel VBA "Microsoft Windows Common Controls 6.0 (SP6)" Location Changes -