-
Notifications
You must be signed in to change notification settings - Fork 69
Open
Description
📝 Problem: Maximum Sum Such That No Two Elements Are Adjacent
Given an array of positive integers, find the maximum sum of elements such that no two elements are adjacent.
🎯 Examples:
Input: nums = [3, 2, 7, 10]
Output: 13
Explanation: Pick 3 and 10 => 3 + 10 = 13
Input: nums = [3, 2, 5, 10, 7]
Output: 15
Explanation: Pick 3 + 5 + 7 = 15
Metadata
Metadata
Assignees
Labels
No labels