#37 - Second largest element in the array (no duplicates)
You are given an array of integers that may contain duplicates. Your task is to implement a function to find the second largest element in the array.
nums = [1, 2, 3, 4, 5]
4
nums = [9, 2, 4, 7, 0]
7
Last updated