linear search1 Linear Search Algorithm (선형 탐색) _ average-case performance Analyze the averagecase performance of the linear search algorithm, if exactly half the time the element x is not in the list, and if x is in the list, it is equally likely to be in any position. If the element is not in the list, then 2n+2 comparisons are needed : two for each pass through the loop, one more to get out of the loop, and one more for the statement just after the loop. If the elem.. 2024. 3. 18. 이전 1 다음