Delete and Earn Problem
Delete and Earn Problem — ExecCode Medium DSA Practice
Solve the Delete and Earn problem on ExecCode. Free online medium DSA practice in Arrays - Basics. Write and run code in Java, C++, Python — no signup required to run.
Problem description
Delete and Earn: House robber on values For Delete and Earn, focus on the exact input variables, return only the requested value, and preserve the required time complexity for the intended pattern.
Examples
Input nums = [3, 4, 2]; Output 6
Constraints
1 ≤ n ≤ 10^4
Practice Delete and Earn free on ExecCode. Browse DSA problems, topic map, and placement guides.