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 1 year ago