There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code. Flon's Law

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.