// write a code in java to print the Nth largest element in an array without sorting the array. // approach: we keep replacing the largest element with INT_MIN and keep track of the largest element in the array. // if we want to find the Nth largest element, we repeat the above step N times. /* class NthLargestElementWithoutSorting{ public static void main(String[] args){ int[] arr = {2, 4, 5, 1, 7, 8, 6, 3}; int n = 3; int NthLargestElement = NthLargestElement(arr, n); System.out.println(NthLargestElement); } public static int NthLargestElement(int[] arr, int n){ int NthLargestElement = 0; for(int i=0; i largest){ largest = arr[j]; } } NthLargestElement = largest; for(int j=0; j