You are viewing a single comment's thread. Return to all comments →
You're right, why x <= 100? Excution time may be reduced using max = Math.max(...b) instead of 100 ...
for x > max => b.every(int => (int % x == 0)) return false
Seems like cookies are disabled on this browser, please enable them to open this website
Between Two Sets
You are viewing a single comment's thread. Return to all comments →
You're right, why x <= 100? Excution time may be reduced using max = Math.max(...b) instead of 100 ...
for x > max => b.every(int => (int % x == 0)) return false