in question 5 - part c we are asked to give an expression that represent the number of comparisons that are being made in the k-ari search, my question is , should we only count the directly comparisons from the form "==", or should we count as well the if conditions from the form "<" (for determine in what section of the list to look for) , as well as comparison, and should be counted to for the answer.
Date: 05 Dec 2014 18:35
Number of posts: 3
RSS: New posts
For simplicity, in the bonus section we count only k-1 comparisons each step, meaning that we count how many borders between sub-lists were compared against the key. the exact number in your code may be larger (e.g. 2-fold), but for the bonus section just assume it is k-1.