Hi!
i am stuck in figuring out the bog O for such nested loop
for s=1 to s<N
{
for e= 1 to e< min(M,s-1)
{
do some work
}
}
if we assume tht M is very large value (but less than N) then the inner loop runs for
0+1+2+.....M times and outer loop runs for N times
so runs of both will always be less than MN
Is the complexity still O(MN)
or we have a better and more efficient statement for O??
Plz help me out.
Regards