leetle

Daily challenge for 2026-09-07

615. Maximum Energy Beverage Mix

You are given an integer array caffeine representing the energy boost of various ingredients in a row. You want to select a subset of these ingredients to maximize the total boost. However, mixing two ingredients that are directly adjacent causes an adverse reaction, so you cannot pick any two adjacent elements. If all available values are negative, you may choose to pick no ingredients, resulting in a total boost of 0.

Return the maximum possible total boost.

Example:
Input: caffeine = [3, 2, 5, 10, 7]
Output: 15

Run this challenge interactively in Python or JavaScript when the app loads.