![]() ![]() Let's now look at how we'd implement this type of search algorithm in a couple different programming languages. We prove that the average time required for the move-to-front heuristic is no more than /2 times that of the optimal order and this bound is the best. To summarize, a sequential search of an N item list requires N comparisons to determine that a number is not in the list. So, given a list of 10,000 items, on average 5,000 comparisons are required to find an item that is.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |