| about | help | code help+videos | done | prefs |
apcsaArraysWinner
In a track meet, data is recorded as a single String containing pairs of (Name Time). For example: "Alice 12.5 Bob 14.2 Charlie 11.9". Given a String with that format, find the person with the fastest (lowest) lap time and return their name as a String. HINTS Doubles can be parsed much like integers, and the algorithm is similar: what has to change in order to get the "alternation" between names and numbers?apcsaArraysWinner("Alice 12.5 Bob 14.2 Charlie 11.9") → "Charlie" apcsaArraysWinner("Slow 20.0 Fast 10.0") → "Fast" apcsaArraysWinner("Zoe 15.5") → "Zoe" ...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: 240
Copyright Nick Parlante 2017 - privacy