InterviewDB
Question
Grow Basil: Simulate Plant Growth Rules on a Grid and Count Surviving Plants After N Days
phone
Question Details
Problem You have a grid of cells, each either containing a basil plant (1) or empty (0). Each day, the following rules apply simultaneously: A plant with fewer than 2 plant neighbors dies (under-nourished). A plant with more than 3 plant neighbors di…
Full Details
🔒
Unlock full leaked content
Full insider details, leaked discussions, and candidate experiences.
Get Premium →Topics
Coding
Phone