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 > reorder
prev  |  next  |  chance

A store keeps its inventory records in parallel arrays. You will be given the item names and the number of each item that the store has in stock. If the store has less than 5 items in stock then it is time to order more of the item. Return a list of item names (ordered the same as the original item list) that need to be ordered.


reorder(["apples", "oranges", "pears"], [10, 10, 2]) → ["pears"]
reorder(["apples", "oranges", "pears"], [0, 1, 2]) → ["apples", "oranges", "pears"]
reorder(["apples", "oranges", "pears"], [15, 10, 20]) → []

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

String[] reorder(String[] items, int[] stockCount) { }

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

Copyright Nick Parlante 2017 - privacy