Search for question
Question

1.3 Task 3:

Allocate a TreeSet and LinkedList both with size and fill both structures with the range of

numbers [0, size).

For times do the following:

• Calculate a random number in the range [0, size) and time how long the .contains () method

takes to find if the element exists in the structure.

Report the average time for each of the structures to find if the element exists (totalTimes/experiments).

Produce a short report (450-500 words) with graphs and/or tables describing the erved behavior

when using TreeSet versus a LinkedList.

Fig: 1