Algorithm Designex02m1_triangle
Number Triangles
3ff75bfd-a183-421f-be99-a03cf111c068.cppC++
1// Loading code...Selected Submission
100 / 100
0.001s
1476 KB
DPImplementation
Time Comp.
O(n^2)
Space Comp.
O(n)
Readability
4/10
"The code calculates a maximum value based on a triangular input, iteratively updating a vector `l1` (and eventually `p`) using values from `l2`. This process resembles a dynamic programming approach where each element's value depends on previous elements, although it's implemented in a somewhat convoluted way."
History
| Attempt | Points | Time ↓ |
|---|---|---|
| Try #1 | 100 | 2/11/2025 |