If an algorithm executes a statement, it is n/2 times, then how come O is equal to O(n). Because the video explains that it is because of the degree of a polynomial. Please explain.
for(int i =0;i<n;i=i+2){
sout(n) ---- This statemet can be print n/2 times
}
f(n) = n/2 then O(n)