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

 

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

Write a method that returns a list of possible "wait times" for theme park rides. Return an array of positive integers given parameters that describe the lowest time, increment, and top time. For example, with a lowest time of 10, and increment of 2, and a top time of 15, you would return {10, 12, 14} because you started at 10 and then went up by 2 then stopped at 15. If the top time had been 14 instead, you would return the exact same array of integers because you include the top time if it is one of the actual times reached. Look at the test data for more examples. Note that all parameters will be positive and the lowest time will always be less than the top time.


minerideWaitTimesList(5, 5, 45) → [5, 10, 15, 20, 25, 30, 35, 40, 45]
minerideWaitTimesList(13, 5, 30) → [13, 18, 23, 28]
minerideWaitTimesList(5, 10, 33) → [5, 15, 25]

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

public int[] minerideWaitTimesList(int lowestTime, int increment, int top) { }

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

Copyright Nick Parlante 2017 - privacy