Tag:Flower bed

  • The problem of planting flowers

    Time:2021-1-21

    Suppose you have a very long flowerbed, with some plots planted with flowers and some plots not. However, flowers can not be planted on adjacent plots, they will compete for water, and both will die. Given a flower bed (represented by an array containing 0 and 1, where 0 means no flowers are planted and […]