Hackerrank – Mark and Toys

Hackerrank – Problem Statement

A description of the problem can be found on Hackerrank.


I started with sorting the toys prices ascending. I looked at the prices from the beginning and sum the prices. If I exceeded the required given sum, I outputed the amount of toys.

I created solution in:

All solutions are also available on my GitHub profile.




Leave a Reply

Your email address will not be published. Required fields are marked *