say have pseudo code says :
for 1 1 'something'
would loop iterate through once , 'something' , fail, or loop fail straight away , 'something' never executed?
the question analyse complexity in relation n, of pseudo code:
:= 1 1 j := n - n^2 n^2 - 1 k = 0;
as pseudo code, for 1 1
should execute once, going notion intuitively, for 1 2
in pseudo code should execute twice.
if share context observed or algorithm itself, perhaps, more. else might turn out xy problem.
edit:
as per updates, in opinion, first loop exists see if reader understands notion of complexity. , should safe assume, first loop executes once.
Comments
Post a Comment