import java.util.*; public class Solution { public void swap(int i,int j,int nums[]){ int temp = nums[i]; nums[i] = nums[j]; nums[j] = temp; } public void sift_down(int i,int nums[],int n){ while(i * 2 + 1 <= n){ if(i * 2 + 2 <= n && nums...