We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
- Prepare
- Algorithms
- Greedy
- Mark and Toys
- Discussions
Mark and Toys
Mark and Toys
Sort by
recency
|
1033 Discussions
|
Please Login in order to post a comment
Here is my c++ solution, you also have a vidéo explanation here : https://youtu.be/DFQO52aB-qI
Using c#
Java Solution
public static int maximumToys(List prices, int k) { // Write your code here Collections.sort(prices); int toys=0; /for(int i=0;i/
Straigthforward python solution:
def maximumToys(prices, k):
PHP