New update is available. Click here to update.

Last Updated: 19 Jul, 2020

Difficulty: Easy

```
Try solving this problem in O(N) time complexity.
```

```
The first line of input contains the integer 'N' representing the size of the array.
The second line of input contains N space-separated integers representing the array elements.
```

```
The only output line contains the fourth-largest element if present, otherwise print -2147483648
```

```
You are not required to explicitly print the output, it has already been taken care of. Just implement the function.
```

```
1 <= N < 10^6
-10^6 <= element <= 10^6
Time Limit: 1 sec
```

SIMILAR PROBLEMS

Merge Two Sorted Arrays Without Extra Space

Posted: 19 Nov, 2022

Difficulty: Moderate

Search In A Sorted 2D Matrix

Posted: 23 Nov, 2022

Difficulty: Moderate

Ninja And The Strictly Increasing Array

Posted: 27 Nov, 2022

Difficulty: Moderate

Negative To The End

Posted: 16 Dec, 2022

Difficulty: Easy

Fake Coin Problem

Posted: 24 Dec, 2022

Difficulty: Easy

Popular Interview Problems: