Measuring programming progress by lines of code is like measuring aircraft building progress by weight. Bill Gates

Rod cutting

Language Java | Level Intermediate | Category Algorithms | August 4, 2015 8:54 am


Algorithm Problem Description

Write a program to find the maximum value obtainable by cutting up the rod and selling the pieces. Rod length is N

Output

          	        
          	        

Array of items: [0, 1, 5, 8, 9, 10, 17, 17, 20, 24, 30]
Rod Length = 5 and solution = 13

          	        
          	        				    


Comments



Please login to add comments.