The program is an illustration of arrays
<h3>What are arrays?</h3>
Arrays are variables that hold multiple values of the same type in one variable name
<h3>The program in Java</h3>
The linear (O(N)) running time complexity program in Java, where comments are used to explain each line is as follows
import java.util.*;
public class Main{
public static void main(String [] args){
//This initializes an array
int arr[] = {16, 17, 4, 3, 5, 2};
//This gets the size of the array
int size = arr.length;
//This iterates through the array
for (int i = 0; i < size; i++){
//This declares an integer variable
int j;
//This iterates through every other element of the array
for (j = i+1; j < size; j++){
//This condition breaks the loop
if (arr[i] <=arr[j])
break;
}
//This conditions prints the dominant element
if (j == size){
System.out.print(arr[i] + " ");}
}
}
}
Read more about arrays at:
brainly.com/question/25083828