Can Place Flowers

You have a long flowerbed in which some plots are planted and some are empty. Flowers cannot be planted in adjacent plots. Given an integer array flowerbed containing 0's and 1's (0 means empty, 1 means planted), and an integer n, return true if n new flowers can be planted without violating the no-adjacent rule, and false otherwise.

Examples
Input: [[1,0,0,0,1],1]
Output: true
Hints

Can Place Flowers

You have a long flowerbed in which some plots are planted and some are empty. Flowers cannot be planted in adjacent plots. Given an integer array `flowerbed` containing 0's and 1's (0 means empty, 1 means planted), and an integer `n`, return `true` if `n` new flowers can be planted without violating the no-adjacent rule, and `false` otherwise.