ขนาดวิดีโอ: 1280 X 720853 X 480640 X 360
แสดงแผงควบคุมโปรแกรมเล่น
เล่นอัตโนมัติ
เล่นใหม่
Optimization: The for loop inside the isPrime function doesn't need to iterate over even numbers, as all prime numbers (except 2) are odd.
I am not really good at programming but i don't think this solution will optimize thee problem. Nice try by the way.
Nice try. But it is still not optimized
Optimization: if a number is divisible by 2, 3 or 5 (and is greater than these divisors) it’s not a prime number.
Nice try, but It is still not optimized
49 is not prime
Even 15 is not prime
Optimization: The for loop inside the isPrime function doesn't need to iterate over even numbers, as all prime numbers (except 2) are odd.
I am not really good at programming but i don't think this solution will optimize thee problem. Nice try by the way.
Nice try. But it is still not optimized
Optimization: if a number is divisible by 2, 3 or 5 (and is greater than these divisors) it’s not a prime number.
Nice try, but It is still not optimized
49 is not prime
Even 15 is not prime