n^2*log(n) because the for loop it n and while is log(n) becuse counter *= 2 and the nested for in while loop we take the woest case is n finaly we hava n^2log(n)