Maximize Memory Points (India Intern :)
Problem Overview
- Reorder n course chapters with memory[i] points to maximize total memory, where reading a chapter yields the cumulative sum up to that point in the chosen order, and all chapters must be read.
- Input: n and array memory[i] (integers, gains or losses); Output: maximum total memory points.
- Context: study planning where revisiting previous chapters causes cumulative effects on memory.
- From Amazon interviews; a coding interview problem and common interview question.
Example
Unlock to view complete problem details
and practice with sample input/output
Was this article helpful?
View Test Cases & Run Code requires membership
Input Variables
Execution Result:
