Need help with a simple Java programming question
mnp (1)

I added a picture of it. I'm mostly unsure about how to count the data in each.

You are viewing a single comment. View All
JoshDaBosh (77)

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.