Search
⌘K

Leetcode 605. Can Place Flowers

Given a binary array representing a flowerbed (0 = empty, 1 = planted) with no adjacent 1s, determine if you can add n new flowers without creating adjacent plants. This is typically solved greedily by scanning the array and planting whenever a 0 has empty neighbors (including edges) until you reach n or exhaust possibilities.

Asked at:

Meta

LinkedIn

LinkedIn


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Late March, 2026

LinkedIn

LinkedIn

Senior

Late February, 2026

Meta

Senior

phrased as seating in theatre

Late February, 2026

LinkedIn

LinkedIn

Senior

Your account is free and you can post anonymously if you choose.