6. (a) (8%) Draw a decision tree that describes binary-search when it is applied to search for a number X in a sorted ar

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899604
Joined: Mon Aug 02, 2021 8:13 am

6. (a) (8%) Draw a decision tree that describes binary-search when it is applied to search for a number X in a sorted ar

Post by answerhappygod »

6 A 8 Draw A Decision Tree That Describes Binary Search When It Is Applied To Search For A Number X In A Sorted Ar 1
6 A 8 Draw A Decision Tree That Describes Binary Search When It Is Applied To Search For A Number X In A Sorted Ar 1 (21.41 KiB) Viewed 55 times
6. (a) (8%) Draw a decision tree that describes binary-search when it is applied to search for a number X in a sorted array A[1..4] of four distinct numbers. (Note: there are three possible outcomes of a comparison between two values X and Y, namely, "X<Y", "X = Y", and "X >Y".) (b) (6%) Determine the average number of comparisons binary-search takes on an array of four distinct elements. (Note: this question is meant to be vague. State any assumptions you made.)
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply