Problem Submissions Solution

Rod Cutting

Difficulty: Medium

Acceptance: %

Points: 30.00

Given a rod of length n(size of array) inches and an array price[] . price[i] denotes the value of a piece of length i. The task is to determine the maximum value obtainable by cutting up the rod and selling the pieces.

Topics

Companies

Articles

Examples:

Expected Time Complexity: O(n * n)

Expected Auxiliary Space: O(n * n)

Constraints:
  • 1 <= price.size() <= 10^3
  • 1 <= price[i] <= 10^6
Companies:
Google
Topics:
Array Dynamic Programming
Locked Content
Access Restricted: Please Login to access the code editor and test cases.