arr = [10, 11, 45, 89, 33, 30]
      arr_size = 6
      k = int(input("Largest element to get: "))
      arr.sort()
      print("Required element is: ",arr[-k])
      
      Python language logo

      Kth Largest Element

      Find the kth largest element from an array

      0 Comments

        Add Comment

        Log in to add a comment

        Codiga - All rights reserved 2022.