Tyler Technologies Interview Question

How do you find a largest number in an array? Write out the code in the whiteboard.

Interview Answers

Anonymous

Aug 23, 2018

I wrote out something like this: for (int counter = 1; counter max) { max = decMax[counter]; } } System.out.println("The highest maximum for the December is: " + max);

Anonymous

Nov 22, 2020

Should be something like this: int currentMax = 0; for(int i = 0; i currentMax) currentMax = array[i]; } return currentMax