You mean that there is a maximum of 8 steps if the element exists in the array,
but 9 steps if the element does not exist?
Hello Melody!
YES!
We search number 1:set {1,…,193}(1)1>⌊1+1932⌋=97nonew set {1,…,97}(2)1>⌊1+972⌋=49nonew set {1,…,49}(3)1>⌊1+492⌋=25nonew set {1,…,25}(4)1>⌊1+252⌋=13nonew set {1,…,13}(5)1>⌊1+132⌋=7nonew set {1,…,7}(6)1>⌊1+72⌋=4nonew set {1,…,4}(7)1>⌊1+42⌋=2nonew set {1,2}(8)1>⌊1+22⌋=1nowe have found number 1 in the last setWe search number 1.5:set {1,…,193}(1)1.5>⌊1+1932⌋=97nonew set {1,…,97}(2)1.5>⌊1+972⌋=49nonew set {1,…,49}(3)1.5>⌊1+492⌋=25nonew set {1,…,25}(4)1.5>⌊1+252⌋=13nonew set {1,…,13}(5)1.5>⌊1+132⌋=7nonew set {1,…,7}(6)1.5>⌊1+72⌋=4nonew set {1,…,4}(7)1.5>⌊1+42⌋=2nonew set {1,2}(8)1.5>⌊1+22⌋=1yesnew set {2}(9)1.5=2nowe have not found number 1.5 in the last set
