Data-Structure-and-Algorithms
Data-Structure-and-Algorithms copied to clipboard
Create 011_Second_Largest_Element
Find Second largest element in an array Given an array of integers, our task is to write a program that efficiently finds the second largest element present in the array. Example:
Input: arr[] = {12, 35, 1, 10, 34, 1} Output: The second largest element is 34. Explanation: The largest element of the array is 35 and the second largest element is 34
Input: arr[] = {10, 5, 10} Output: The second largest element is 5. Explanation: The largest element of the array is 10 and the second largest element is 5
Can I do this request?