Skip to content
Need help with a simple Java programming question
Profile icon
mnp

I added a picture of it. I'm mostly unsure about how to count the data in each.
This file cannot be displayed: https://storage.googleapis.com/replit/images/1535413863436_ee6c82f331b76326cd66ae90e0d7aff4.pn

You are viewing a single comment. View All
Profile icon
JoshDaBosh

for the second method:
keep the data elements in an array.

split the array into pairs using this SO thread:
https://stackoverflow.com/questions/27857011/how-to-split-a-string-array-into-small-chunk-arrays-in-java

Then iterate through each element of the array (each one should be a sub-array) and if the average is either less that 68% of the general average of all the elements or greater than 168% of the general average, then store that in a new array and that will be the outliers list.