Java program to find the largest derangement
import java . io . * ; import java . util . Collections ; import java . util . PriorityQueue ; class GFG { public static void printLargest ( int a [ ] , int n ) { PriorityQueue < Integer > pq = new PriorityQueue < > ( Collections . reverseOrder ( ) ) ;