Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/codemistic/Data-Structures-and-Algorithms
/ main
Function
main
CPP/Dynamic Programming/Rod-Cutting.cpp:52–59 ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
50
51
52
int main() {
53
54
vector<int> price = {2,5,7,8,10};
55
56
int n = price.size();
57
58
cout<<
"The Maximum price generated is "
<<cutRod(price,n);
59
}
60
61
/*
62
Output:
Callers
nothing calls this directly
Calls
2
cutRod
Function · 0.85
size
Method · 0.45
Tested by
no test coverage detected