Activate Neighbors for Maximum Score
Mark indices as black to activate adjacent white cells and maximize your score
You are given an array of non-negative integers. Your task is to select a set of indices to mark as black. After marking, each unmarked (white) cell that is adjacent to at least one black cell contributes its value to the total score.
Return both the maximum possible score and the list of marked indices that yield this score.
Note: Each white cell is coun…
Keep reading with a 7-day free trial
Subscribe to Puzzle Spree to keep reading this post and get 7 days of free access to the full post archives.

