Analysis Of Algorithms University of Bridgeport Analysis of Algorithms


Modify line 2 of code to: j:=1 to n – i



Download 3.4 Mb.
Page4/33
Date28.05.2018
Size3.4 Mb.
#51061
1   2   3   4   5   6   7   8   9   ...   33

Modify line 2 of code to: j:=1 to n – i {this eliminates unnecessary comparisons}


Statement #

# of executions

1

n

2



3, 4, 5, 6




T(n) =

Download 3.4 Mb.

Share with your friends:
1   2   3   4   5   6   7   8   9   ...   33




The database is protected by copyright ©ininet.org 2024
send message

    Main page