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

 

jebbert@volusia.k12.fl.us > drWhoRatingsAdvanced1
prev  |  next  |  chance

Write a method that returns an array of the string(s) with the highest rating. You will be passed a string array and an integer array of the same length. These arrays may be empty, in which case you must return an empty string. Otherwise return an array containing all the strings that have tied for having the greatest number associated with them. Always remember to look carefully at the test data before you get too far into your code.


drWhoRatingsAdvanced1(["A", "B", "C", "D", "E", "F"], [45, 128, -34, 128, 128, 45]) → ["B", "D", "E"]
drWhoRatingsAdvanced1(["y", "y", "z"], [-7, -7, -16]) → ["y", "y"]
drWhoRatingsAdvanced1(["a", "b", "c", "d", "e", "f", "x", "y"], [1, 5, 1, 5, 1, 5, 1, 5]) → ["b", "d", "f", "y"]

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

public String[] drWhoRatingsAdvanced1(String[] strs, int[] score) { }

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: 290

Copyright Nick Parlante 2017 - privacy