CIS 2168 / 2: Lab-Assignment #6: Performance comparison of Arrays and Binary Search Trees


THIS IS A 1 WEEK ASSIGNMENT !


No graphics this time. Pure, simple, dry: data structure performance evaluation:

Task 1:

Build your own Binary Search Tree data structure class 'BST'. BST should contain: The node-class NodeBST you have to provide consists of:


Task 2:


Task 3:

Check how fast the tree performs:

Task 4:

Check again how fast the tree performs, but this time the order of numbers is different:

How to measure time in JAVA

The method "static long System.currentTimeMillis()" returns the current time in milli seconds. To check how long a task needs, call that function before and after the task and store the time difference.

Enjoy!