Answered step by step
Verified Expert Solution
Question
1 Approved Answer
In Java Example outputs Allocate an array with size and fill it with random numbers using the > to seed the random number generator. To
In Java
Example outputs
Allocate an array with size and fill it with random numbers using the > to seed the random number generator. To get the most noticeable effect use the Integer type rather than the primitive int type. For times do the following: Calculate the time to access each element in the first 10% of the array and a single random element in the last 10% of the array. Next, calculate the sum of each of the elements accessed and report the following averages: 1. Time to access a single element in the first 10% of the array. 2. Time to access a single random element in the last 10% of the array. 3. Average sum of the elements. Produce a short report (450-500 words) with graphs and/or tables describing the observed behavior when accessing elements at the prescribed portions of the array. Task 2 Avg time to access known element: 15.13 nanoseconds Avg time to access random element: 646.00 nanoseconds Sum: 1005470868.00 Task 3 Avg time to find in set: 69055.00 nanoseconds Avg time to find in list: 83721555.00 nanoseconds Allocate an array with size and fill it with random numbers using the > to seed the random number generator. To get the most noticeable effect use the Integer type rather than the primitive int type. For times do the following: Calculate the time to access each element in the first 10% of the array and a single random element in the last 10% of the array. Next, calculate the sum of each of the elements accessed and report the following averages: 1. Time to access a single element in the first 10% of the array. 2. Time to access a single random element in the last 10% of the array. 3. Average sum of the elements. Produce a short report (450-500 words) with graphs and/or tables describing the observed behavior when accessing elements at the prescribed portions of the array. Task 2 Avg time to access known element: 15.13 nanoseconds Avg time to access random element: 646.00 nanoseconds Sum: 1005470868.00 Task 3 Avg time to find in set: 69055.00 nanoseconds Avg time to find in list: 83721555.00 nanosecondsStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started