Question
A charity is having a silent auction where people place bids on a prize without knowing anyone elses bid. Each bid includes a persons name
A charity is having a silent auction where people place bids on a prize without knowing anyone elses bid. Each bid includes a persons name and the amount of their bid. After the silent auction is over, the winner is the person who has placed the highest bid. If there is a tie, the person whose bid was placed first wins. Your job is to determine the winner of the silent auction. Input Specification The first line of input contains a positive integer N, where 1 N 100, representing the number of bids collected at the silent auction. Each of the next N pairs of lines contains a persons name on one line, and the amount of their bid, in dollars, on the next line. Each bid is a positive integer less than 2000. The order of the input is the order in which bids were placed. Output Specification Output the name of the person who has won the silent auction.
Java Language
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started