Tyler Technologies interview question

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

Interview Answers

Anonymous

23 Aug 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

22 Nov 2020

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