Challenge: Find Second Maximum Value in a List
Given a list of size n, can you find the second maximum element in the list? Implement your solution in Python and see if your output matches the correct output.
We'll cover the following
Problem Statement
Implement a function find_second_maximum(lst)
which returns the second largest element in the list.
Input:
A List
Output:
Second largest element in the list
Sample Input
[9,2,3,6]
Sample Output
6
Level up your interview prep. Join Educative to access 70+ hands-on prep courses.