Bug Report for https://neetcode.io/problems/can-place-flowers
Please describe the bug below and include any steps to reproduce the bug or screenshots if possible.
I cannot run any solution that I type into the IDE. The error that keeps on coming back is:
Main.java:-4: error: package javafx.util does not exist
import javafx.util.*;
^
1 error
I don't even import that package from the source code below:
class Solution {
public boolean canPlaceFlowers(int[] flowerbed, int n) {
if (n == 0) return true;
for (int i = 0; i < flowerbed.length; i++) {
if (flowerbed[i] == 0) {
boolean prevEmpty = (i == 0) || (flowerbed[i - 1] == 0);
boolean nextEmpty = (i == flowerbed.length - 1) || (flowerbed[i + 1] == 0);
if (prevEmpty && nextEmpty) {
flowerbed[i] = 1;
n--;
}
}
if (n <= 0) return true;
}
return n <= 0;
}
}
Bug Report for https://neetcode.io/problems/can-place-flowers
Please describe the bug below and include any steps to reproduce the bug or screenshots if possible.
I cannot run any solution that I type into the IDE. The error that keeps on coming back is:
I don't even import that package from the source code below: