After seeing this question, solutions off the top of my head is to sort it. Hence, these solutions are all based on sorting the array.

Use builtin Java sort. Since Arrays.sort has a time complexity of NLogN, its complexity is NLogN.

```
private int solveByBuiltInSort(int[] nums, int k) {
Arrays.sort(nums);
return nums[nums.length - k];
}
```

Use minimum priority queue. We can only keep k elements. The complexity of the operations by a pq is depending on how many elements it have. So we may say this method is faster than the first one.

```
private int solveByPQ(int[] nums, int k) {
PriorityQueue<Integer> pq = new PriorityQueue<>();
for (int num : nums) {
pq.add(num);
if (pq.size() > k) pq.poll();
}
return pq.poll();
}
```

Lastly, the inputs are all integers. There exists a linear algorithm to sort them. So we can use LSD radix sort.

```
private int solveByLinearSort(int[] nums, int k) {
final int R = (1 << 8);
final int bitmask = R - 1;
int[] aux = new int[nums.length];
for (int i = 0; i < 4; i++) {
int[] count = new int[R + 1];
for (int num : nums) {
int c = (num >>> (i * 8)) & bitmask;
count[c + 1]++;
}
for (int r = 0; r < R; r++) count[r + 1] += count[r];
if (i == 3) {
int shift1 = count[R] - count[R/2];
int shift2 = count[R/2];
for (int r = 0; r < R/2; r++)
count[r] += shift1;
for (int r = R/2; r < R; r++)
count[r] -= shift2;
}
for (int num : nums) {
int c = (num >>> (i * 8)) & bitmask;
aux[count[c]++] = num;
}
System.arraycopy(aux, 0, nums, 0, nums.length);
}
return nums[nums.length - k];
}
```

The integers are sorted byte by byte with the if statement to cope with negative integers. When the most significant byte is considered, 0x80-0xFF should be before 0x00-0x7F.