2
* @param {number[]} spells3
* @param {number[]} potions4
* @param {number} success7
var successfulPairs = function (spells, potions, success) {9
potions.sort((a, b) => b - a);12
for (let i = 0; i < spells.length; i++) {13
if (!map.has(spells[i])) {14
let s = success / spells[i];15
let len = search(potions, s);17
map.set(spells[i], len);19
let len = map.get(spells[i]);27
function search(potions, target) {30
let right = potions.length - 1;31
while (left <= right) {32
let mid = Math.floor((left + right) / 2);33
if (potions[mid] < target) {