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

 

abraskin@mbusd.org 2016_problem_set_06-djklslwf > within5
prev  |  next  |  chance

Given two parallel arrays, one of student names, and an equal length array of integer scores, return an array of students that scored within 5 points (inclusive) of a specified score.


within5(["Fritz", "Clyde", "Monty", "Penelope", "Liza"], [94, 95, 100, 100, 95], 95) → ["Fritz", "Clyde", "Monty", "Penelope", "Liza"]
within5(["Adam", "Belinda", "Carly", "Jimmy", "Ann"], [94, 95, 99, 88, 92], 82) → []
within5(["Ken", "Gena", "Jason", "Aaron", "Shawn", "David"], [100, 70, 95, 99, 75, 75], 65) → ["Gena"]

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

public String[] within5(String[] names, int[] scores, int target) { }

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

Copyright Nick Parlante 2017 - privacy