id/email
password
forgot password | create account
about | help | code help+videos | done | prefs
CodingBat code practice

 

frew@mclean.com > highRangeCity
prev  |  next  |  chance

Given two arrays that represent a map (temperatures and cities), determine the city with the highest range in temperatures.


highRangeCity([78, 61, 40, 38], ["Blacksburg", "Blacksburg", "Seattle", "Seattle"]) → "Blacksburg"
highRangeCity([78, 61, 81, 62, 84, 59, 47, 60, 31, 49], ["Blacksburg", "Blacksburg", "Blacksburg", "Blacksburg", "Blacksburg", "New York", "New York", "New York", "New York", "New York"]) → "New York"
highRangeCity([78, 61, 81, 62, 84, 59, 47, 60, 31, 49, 62, 41, 63, 42, 62], ["Blacksburg", "Blacksburg", "Blacksburg", "Blacksburg", "Blacksburg", "New York", "New York", "New York", "New York", "New York", "San Jose", "San Jose", "San Jose", "San Jose", "San Jose"]) → "New York"

...Save, Compile, Run (ctrl-enter)

public String highRangeCity(int[] temps, String[] cities) { }

Editor font size %:
Shorter output


Forget It! -- delete my code for this problem

Progress graphs:
 Your progress graph for this problem
 Random user progress graph for this problem
 Random Epic Progress Graph

Java Help

Misc Code Practice

Difficulty: 350

Copyright Nick Parlante 2017 - privacy