the element being searched for is not found in an array of 100 elements . what is the average number of comparisons needed in a sequential search to determine that the element is not there , if the elements are completely unordered ?
let us assume k be the element we need to search then let array be n 1 , n 2 , n 3 . . . . . . . . . . . . . . n 100 now to prove that the element searched is not there in the array we have to compare the element k with every element in the array . so , totally we need 100 comparisons . answer : d
multiply(const_2, floor(divide(multiply(add(100, const_1), divide(100, const_2)), 100)))