Search⌘ K
AI Features

Can Place Flowers

Can Place Flowers asks whether an integer array of empty and planted plots can accommodate n new flowers while keeping every pair of flowers nonadjacent. Return true or false.

Statement

Given an integer list flowerbed, each element is either ...