24.01.2014 Views

Arrays

Arrays

Arrays

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

and index of the element with the maximum weight.<br />

int maxIndex;<br />

for (maxIndex = histArray.length -1;<br />

(maxIndex >= 0) && (histArray[maxIndex] == 0);<br />

--maxIndex);<br />

// Print histogram<br />

System.out.println("Weight\t:\tFrequency");<br />

for (weight = minIndex; weight

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!