-
Notifications
You must be signed in to change notification settings - Fork 3
/
plan.txt
14 lines (12 loc) · 1.14 KB
/
plan.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
Team Incredibly Cohesive (Orion, David C , Jaylen)
APCS
lab03 -- Get Empirical
0. Array of Comparables initialized and filled with Comparable objects. Each item in the array will correspond with its index. For example, the first item of the array will be 0.
1. Record starting time with currentTimeMillis before beginning test. Value stored in a variable.
2. Run LinSearch (or BinSearch) Preferably search for value corresponding to higher index rather than one of the first few indices. (If you want to find the value at index 50, just tell LinSearch/BinSearch to find 50.)
3. Immediately after running LinSearch (or BinSearch), run currentTimeMillis and record its value to a different variable.
4. Find the difference between your two variables and print it. This is the time it took for said search method to find the value (in milliseconds, could convert to different measurement).
5. Repeat steps 1-4 but with the other Search method. (If LinSearch first, run BinSearch)
-Be sure to update your starting time variable.
6. Compare
(We are thinking of increasing the size of our dataset after each test and also searching for indexes at varying locations.)