二分查找的平均查找程度,秒看秒会
1.平均查找长度就是(ASL):表中每个元素查找成功的次数的总和/表中元素个数
由此发现规律:
表长为n
n = 7,ASL = 17 n = 8,ASL = 21 n = 9,ASL = 25 n = 10,ASL = 29 n = 11,ASL = 33 n = 12,ASL = 37
差值为4
1.平均查找长度就是(ASL):表中每个元素查找成功的次数的总和/表中元素个数
由此发现规律:
表长为n
n = 7,ASL = 17 n = 8,ASL = 21 n = 9,ASL = 25 n = 10,ASL = 29 n = 11,ASL = 33 n = 12,ASL = 37
差值为4
共有 0 条评论