For n=1 : Inner loop will execute 1 time.
For n=2 : Inner loop will execute 1+2 times.
For n=4 : Inner loop will execute 1+2+4 times.
For n=8 : Inner loop will execute 1+2+4+8 times.
. . .
では、計算の複雑さをどのように見つけることができますか?
私の答えは次のとおりです。内部ループの反復回数 = n+(n/2)+(n/4)+(n/8)+...+(n/n)