# Kth Largest Element

Find K-th largest element in an array.

Can you do it in O(n) time and O(1) space?

Example

```
Array k Result
[1, 2, 3, 4, 5] 1 5
[9, 3, 2, 4, 8] 2 8
```

The following is a naive O(n log n) time , O(1) space solution.