Google - optimal solution for the interview question

Difficulty: EASYCategory: InterviewExperienceFrequency: 1Asked On 2025-03-25Added By Anonymous
Source: Link
🧭 Experience: unknown
✅ Outcome: unknown
💰 Compensation: unknown
📍 Location: unknown
🏢 Company: Google
🎓 Education: unknown
🎁 Benefits: unknown
📅 Offer Date: unknown
Got the below question in the interview. What's the best way to solve it? Question: Dr Mario us a video game that takes place in an 8 cell x 16 cell board. Each level in the game corresponds to a different number of red, blue and yellow viruses. No more than 2 viruses of the same colors are adjacent vertically or horizontally. The placement of viruses chnages each time the game is played. Write a funtion that given an integer number of viruses as an argument, initializes a game board with random viruses.
Comments