The outer loop of limit will run will run for Logn
It contain one inner loop of ith loop
ith loop will also run for logn times
Jth loop runs for n/2 times
And next jth loop will run for logn time
Hence th total complexity for the ith loop becomes
Logn(n/2+logn)=nlogn+(logn)^2
For the outer loop
The total complexoty will become
Logn(nlogn+(logn)^2)
Making the overall complexity=bigoh(n(logn)^2)
#please correct if i m wrong