tie breaking

Actually now that I think about it, why use intermediate data structures at all?  Since you're doing a full traversal anyway, just track the max value and item then return it.