Spectrum Interview Question

1.) Find column B value associated with grouped max from column A.