public static void Main()
Solution s = new Solution();
Console.WriteLine("IS PLATABLE: {0}",s.CanPlaceFlowers([1,0,0,0,1], 1));
public bool CanPlaceFlowers(int[] flowerbed, int n) {
int previousState = 0, plantedCount = 0;
for(int i = 1; i<flowerbed.Length; i++)
if(flowerbed[i-1] == 1 && flowerbed[i] == 0)
if(isPlanted && plantedCount <= n)
else if(flowerbed[i-1] == 0 && flowerbed[i] == 1)