# searching easy

The Richest Pirate's Treasure

Every pirate on the ship brags about their gold β€” settle it once and for all! πŸ΄β€β˜ οΈ

You get a list of pirate names and a matching list of gold amounts (same order, at least one pirate, no ties). Print the name of the richest pirate.

Example:

Input: names = ["anne", "jack", "mo"], gold = [300, 750, 120] Output: jack

Comparing the gold amounts, 750 (jack's) is the biggest β€” and since names[1] is jack, that's who we print.

πŸ’‘ need a hint?

srch-richest-pirate.pyπŸ”’ given lines are locked β€” write your code in between
loading...