Challenge: Find Second Maximum Value in a List

Try to solve the Find Second Maximum Value in a List problem.

We'll cover the following

Statement

Given a list of integers, nums, find the second maximum value from the list.

Constraints:

  • 22 \leq nums.length 103\leq10^3

  • 105-10^5\leq nums[i] 105\leq10^5

Examples

Level up your interview prep. Join Educative to access 80+ hands-on prep courses.