Generation

generate functionTue, 15 Nov 2022

You are given an array of integers numbers and two integers left and right. You task is to calculate a boolean array result, where result[i] = true if there exists an integer x, such that numbers[i] = (i + 1) * x and left ≤ x ≤ right. Otherwise, result[i] should be set to false.

add([1, 4, 2, 5, 3], 2, 4) = [true, false, true, false, false]

TypeScript
Generate More

Want to kickstart your project?Use the new AI Studio to create your code