HELP NEEDED ASAP
Posted: Sun Jul 03, 2022 11:22 am
HELP NEEDED ASAP
procedure function(a1, a2, ○ Q(1) O Q(n²) Q(n) an: real numbers with n ≥ 2) Q(logn) forj:= 2 to n i=1 while a, > a, i=i+1 m := aj for k:= 0 to j-i-1 aj-kaj-k-1 What is the best-case scenario time complexity of this algorithm? a₁:=m {a₁ an is in increasing order}
procedure function(a1, a2, ○ Q(1) O Q(n²) Q(n) an: real numbers with n ≥ 2) Q(logn) forj:= 2 to n i=1 while a, > a, i=i+1 m := aj for k:= 0 to j-i-1 aj-kaj-k-1 What is the best-case scenario time complexity of this algorithm? a₁:=m {a₁ an is in increasing order}