On this page, you will see how long it takes to run a linear search algorithm.
On Unit 2 Lab 3 Page 6: Solving a Word Puzzle, you built a block and used it with keep
to find words of a specific length in a word list. How long does a process like that take?
does () have () letters?
predicate.
The computation time
block takes any reporter (with its inputs filled in), computes the result but ignores it, and instead reports how long it took to do the computation (in milliseconds).
In this example, it took 27 milliseconds to compute the list of integers from 1 to 1000. (The report you see will depend on how fast your computer is and what other programs are running on it.)
You can look inside computation time
to see how it works: Right-click (or control-click on a mac) the block and select "edit..." from the menu that appears.
computation time
expression you just used to answer the previous question three more times and note the range of answers. They're not exactly the same because of other things that your computer is doing at the same time, so you should always take whatever result it gives you as approximate.computation time
to check using the 100,000 words list. Searching for all the five-letter words in a specific word list is an instance of a more general problem: searching for all the words of any particular length.
Should this maybe be a quizlet? Not sure... --MF, 7/13/20
The only way to answer a "How many words..." problem is to check every single word in the dictionary. So if you have ten times as many words in the dictionary, it takes ten times as long to check them all.