about | help | code help+videos | done | prefs |
apcsaListPricedRight
Given an ArrayList of names, an ArrayList of price guesses and an actual price, find and return the name of the person who guessed closest to the actual price without going over it. If everyone went over, return an empty String. Precondition: no two guesses will be the same value, and the two ArrayLists will have the same size. apcsaListPricedRight(["Jett", "Lisa", "Kessie"], [53, 23, 100], 101) → "Kessie" apcsaListPricedRight(["Jeron", "Abel", "Maggie"], [23, 24, 22], 26) → "Abel" apcsaListPricedRight(["Anna", "Olaf", "Elsa"], [1000, 10000, 100000], 50) → "" ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Difficulty: 220
Copyright Nick Parlante 2017 - privacy