Breaking News: Grepper is joining You.com. Read the official announcement!
Check it out

How can one find the three largest values of an input array efficiently, namely without having to sort the input array?

Wissam answered on May 21, 2022 Popularity 3/10 Helpfulness 7/10

Contents


More Related Answers

  • Sorting number excluding elements in highest to lowest
  • JavaScript program that takes three inputs, combines and arranges them in all possible ways, and then returns the smallest result
  • largest = None smallest = None while True: num = input("Enter a number: ") if num == "done": break print(num) print("Maximum", largest)
  • Program to find second largest number in an array
  • multithreaded program for finding largest element in an array
  • a=[] n=int(input("Enter number of elements:")) for i in range(1,n+1): b=int(input("Enter element:")) a.append(b) a.sort() print("Largest element is:",a[n-1])

  • How can one find the three largest values of an input array efficiently, namely without having to sort the input array?

    2
    Popularity 3/10 Helpfulness 7/10 Language python
    Source: Grepper
    Link to this answer
    Share Copy Link
    Contributed on May 21 2022
    Wissam
    0 Answers  Avg Quality 2/10


    X

    Continue with Google

    By continuing, I agree that I have read and agree to Greppers's Terms of Service and Privacy Policy.
    X
    Grepper Account Login Required

    Oops, You will need to install Grepper and log-in to perform this action.