What is the running time of the following piece of code ?

void function(int n){
     for(int i=1; i<=n/3; i++)
          for(int j=1; j<=n;j+=4)
               printf("1");
}


Difficulty level
This exercise is mostly suitable for students
O(n*n)

Back to the list of exercises
Looking for a more challenging exercise, try this one !!
Target sum in a BST