# -*- coding: utf-8 -*-
"""
Created on Tue Aug 18 17:02:14 2020

@author: santhilata
"""


# Given an array A of size N, print second largest element from the array

#import numpy as np

def second_largest(A):
    '''
    if len(A) < 2:
        return A
    
    A= sorted(A, reverse=True    )
    
    return A[1]
    '''
    
    

A = [34,2,31, 23,11, 55]
A = [0,0,0,0]
A= [2]
a = second_largest(A)

print(a)
        
6f18e1ddc5633bcc832dddedc11af76b208ae8e5
<mask token>

<mask token>


def second_largest(A):
    """
    if len(A) < 2:
        return A
    
    A= sorted(A, reverse=True    )
    
    return A[1]
    """


<mask token>

<mask token>


def second_largest(A):
    """
    if len(A) < 2:
        return A
    
    A= sorted(A, reverse=True    )
    
    return A[1]
    """


<mask token>
print(a)

<mask token>


def second_largest(A):
    """
    if len(A) < 2:
        return A
    
    A= sorted(A, reverse=True    )
    
    return A[1]
    """


A = [34, 2, 31, 23, 11, 55]
A = [0, 0, 0, 0]
A = [2]
a = second_largest(A)
print(a)

# -*- coding: utf-8 -*-
"""
Created on Tue Aug 18 17:02:14 2020

@author: santhilata
"""


# Given an array A of size N, print second largest element from the array

#import numpy as np

def second_largest(A):
    '''
    if len(A) < 2:
        return A
    
    A= sorted(A, reverse=True    )
    
    return A[1]
    '''
    
    

A = [34,2,31, 23,11, 55]
A = [0,0,0,0]
A= [2]
a = second_largest(A)

print(a)
        