9. Best Auction Bids

In a technical interview, assume you are building a system to track top auction bids for your local community fundraiser. As new bids are made, your goal will be to track the number of top bids as they are announced:

let bids = [2, 1, 9, 4, 8, 6, 10, 5]

func topBids(bids: [Int]) -> Int {
  //code goes here..
}

Hints

When organizing data, we sometimes make the assumption that correctly sorted data should always be presented in ascending or descending order. However, there are many times when the goal is find the largest or smallest value for a given dataset.