Opening your workspace…
Workspace/Coding room
Opening your workspace…
Malphite is farming top lane. He has time for one auto before the wave moves under turret. Given each enemy minion's health and the damage his auto would deal, how many minions could he choose for a last hit?
[50,120,80,200], 100Output2He can last-hit either the minion at 50 health or the one at 80. That gives him two choices.
[100,100,100], 100Output3Each minion has exactly enough health to be finished by the attack.
Compare each minion independently with the damage of one attack.
function solve(minionHealth, attackDamage) { // Write your solution here. }
Tab inserts two spaces. Shift+Tab outdents. Use the arrow keys and Tab to choose a suggestion. Press Escape, then Tab, to leave the editor. Press Control or Command with apostrophe to run samples or with Enter to submit.