Compare and contrast linked list and binary search tree
We have studied a number of data structures and their algorithms for storing and retrieving data. The performance of the retrieval searching of the data has also been derived theoretically. The summary of data structures and their searching performance is given below. The purpose of this final project is to implement several of these structures and measure the relative performance of searching out data in the structure. Your results should correspond to the theoretical results, otherwise you must have a flaw in your implementation.
The expected ranking of each of the six searches is also given. Store this collection of integers in the various data structures then perform a series of retrievals of random values in the collection and measure emperically the time it takes to do the retrievals in each of the structures.
You should run this program with varying quantities of data usually double the size to see the variations in the structures' retrieval performances.
The basic approach is to design the test driver to generate a large array of numbers in random order. The size compare and contrast linked list and binary search tree the array should be interactively entered. For this description, let's call the size N.
Be sure they're positive. Your driver should print out the first 10 elements and the last 10 elements to verify that the array contains random values. Once you have a random array of numbers test the searching algorithm for each data structure in turn.
For each data structure, generate a random number r between 0 and N-1 and retrieve randArray[r] as the search key, search for the search key--you should always find it and we won't measure searches that fail, and measure the time it took. To get something measurable, you should repeat searches with different search keys, of course between the start and stop timer. In other words, get the system time, perform searches, get the system time compare and contrast linked list and binary search tree report the difference.
Move to the next structure and repeat the searches on that structure and report the search time. Do not, however measure the time to prepare the loading of the data structure as described below. Data Structure Preparation Unsorted Array Just search the array as prepared Sorted Array Create a second array of size N, copy the array over,and use the quicksort compare and contrast linked list and binary search tree sort the second array.
Now use a binary search. The duplicate values shouldn't cause any problems. Use division modulus as your hash function. Again use division as your hash function You may use any code available from the text or from the Java standard library. Be sure to clearly indicate what code is borrowed and from where, and what code is yours.
Be sure that the borrowed code truely implements the data structure you really want to test. Be sure you properly use the Integer wrapper for Listable and Comparable datatypes. As in any scientific experiment, run this simulation with different array sizes N to demonstrate that your performance measurements are a function of array size and is congruent to the expected performance of the searching algorithm. For searching algorithms of compare and contrast linked list and binary search tree same complexity, also try to explain the why one may be better than another, i.
Compare the results of the searching of these six structures in a table and write up a word conclusion to compare results to theory. Write your conclusion and table of results using Word. Submit your report with the listings and runs. Create a second array of size N, copy the array over,and use the quicksort to sort the second array.
Load the tree from the original array. Load the hash table with the original unsorted array using simple linear probing. Compare and contrast linked list and binary search tree this hash table with N buckets; each bucket a linked list. Again use division as your hash function.
Keep a record of all of your email, Skype and IM conversations as these may come in handy. Depending on the jurisdiction of the broker, the regulatory agency you need to contact may vary. Some regulatory agencies are more effective than others but they all warrant a try.
If your strategy is based on volatility or you are using a trending strategy, focus on times of day where the price moves are largest. Check where the charts show decreased hourly volatility.
No matter what time frame you trade on, create a checklist which helps you determine what type of market you re looking to trade in.