Analysis Of Algorithms University of Bridgeport Analysis of Algorithms



Download 3.4 Mb.
Page31/33
Date28.05.2018
Size3.4 Mb.
#51061
1   ...   25   26   27   28   29   30   31   32   33
This is a g.p. where,

A -> 1

R -> 2

N -> k

Therefore, Sn =

Putting the entire expression together, we have

Average number of comparisons(assuming element is in array)

or,


Average number of comparisons
Download 3.4 Mb.

Share with your friends:
1   ...   25   26   27   28   29   30   31   32   33




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

    Main page