You are viewing a single comment's thread. Return to all comments →
Here is my c++ solution, you can find the video here : https://youtu.be/yC-TXToDbD0
int getMoneySpent(vector<int> keyboards, vector<int> drives, int b) { int ans = -1; for(int k : keyboards){ for(int d : drives){ if(k + d > ans && k + d <= b) ans = k + d; } } return ans; }
Seems like cookies are disabled on this browser, please enable them to open this website
Electronics Shop
You are viewing a single comment's thread. Return to all comments →
Here is my c++ solution, you can find the video here : https://youtu.be/yC-TXToDbD0