Puzzle Spree

Puzzle Spree

Activate Neighbors for Maximum Score

Mark indices as black to activate adjacent white cells and maximize your score

Kuai Yu's avatar
Kuai Yu
Mar 10, 2025
∙ Paid

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.

Already a paid subscriber? Sign in
© 2025 Puzzle Spree · Privacy ∙ Terms ∙ Collection notice
Start your SubstackGet the app
Substack is the home for great culture