Algorithm Designa66_q2a_eating_futomaki
Eating Futomaki
b5663473-bb65-448a-b0a0-b89d79c733cd.cppC++
1// Loading code...Selected Submission
100 / 100
0.184s
98692 KB
DPImplementation
Time Comp.
O(n^2)
Space Comp.
O(n^2)
Readability
6/10
"The code uses recursion with memoization to find the maximum sum achievable by selecting non-adjacent elements in a sequence. This is a classic application of dynamic programming, specifically overlapping subproblems and optimal substructure."
History
| Attempt | Points | Time ↓ |
|---|---|---|
| Try #6 | 100 | 2/19/2025 |
| Try #5 | 100 | 2/19/2025 |
| Try #4 | 100 | 2/19/2025 |
| Try #3 | 100 | 2/19/2025 |
| Try #2 | 40 | 2/19/2025 |
| Try #1 | 40 | 2/19/2025 |