Ch-MANASA19 / Ch-MANASA19/Java

Maximum Sum of Non-Adjacent Elements

Open
#17 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
1
Forks
7
PR merge metrics
No merged PRs in 30d

Description

📋 Problem Description

Given an array of positive integers, find the maximum sum of elements such that no two selected elements are adjacent in the array.

You can only choose elements that are not next to each other. The goal is to maximize the total sum of chosen numbers.

Example 1

Input: nums = [3, 2, 7, 10]
Output: 13
Explanation: Choose elements 3 and 10 → sum = 13.

I WOUD LIKE TO WORK ON THIS

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by locating the Java source file where this basic program belongs; no file or test is named in the issue. Implement the maximum-sum behavior described for non-adjacent positive integers and verify it against the provided [3, 2, 7, 10] example, which should produce 13.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
backend
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.