└── Second Largest in Geeks for Geeks.cpp /Second Largest in Geeks for Geeks.cpp: -------------------------------------------------------------------------------- 1 | // User function template for C++ 2 | class Solution { 3 | public: 4 | // Function returns the second 5 | // largest elements 6 | int getSecondLargest(vector &arr) { 7 | // Code Here 8 | int n=arr.size(); 9 | sort(arr.begin(),arr.end()); 10 | int max=arr[n-1]; 11 | int smax=-1; 12 | for(int i=n-1;i>=0;i--) 13 | { 14 | if(arr[i]