← Microsoft questions
CodingReported in a candidate post, Oct 2021

Last index to place a flower

Filed under Microsoft

Given an array representing a flowerbed (1 = flower, 0 = empty), determine if n flowers can be planted without violating the rule that no two flowers are adjacent.

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related Microsoft questions

Collected from public candidate posts and coding forums. Updated Nov 2026.