Skip to content

Instantly share code, notes, and snippets.

@banta
Last active August 29, 2015 14:27
Show Gist options
  • Save banta/283ec53ec1cacbb7d26f to your computer and use it in GitHub Desktop.
Save banta/283ec53ec1cacbb7d26f to your computer and use it in GitHub Desktop.
Code challenge 002
price_ranges = [{c_name: "Company A", range: [1000, 3000]}, {c_name: "Company B", range: [6000, 10000]}, {c_name: "Company C", range: [500, 2500]}]
# Given such a list and the disered price range a shopper wishes to pay, return the companies the shopper should examine.
# @param [Interger, Interger]
#
# @return [Array]
#
# @example
# examine_companies(2500, 5000)
# #=> [{c_name: "Company A", range: [1000, 3000]} {c_name: "Company C", range: [500, 2500]}
#
def examine_companies(low, high)
#TODO Implement the method
end
@montell
Copy link

montell commented Aug 20, 2015

@banta, price_ranges array does not have a closing square bracket(])

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment