Ad
  • Custom User Avatar

    Why 1 line tho..

    Bytes don't matter here :'(

  • Custom User Avatar

    Most upvoted for Best Practices (OOP is cool, .every() is often forgotten) but it relies heavily on the constraints of the problem, namely the cost of the ticket coincidentally equalling the lowest possible bill denomination (the ticket cost is not explicitly set or configurable), and the values of the possible bills and possible change combinations being implemented in a very rigid way. If the hypothetical clerk could, in addition to 25, 50, and 100 dollar bills, receive 250, 500, and 1000 dollar bills, the sell function would become bloated, and exponentially larger.