Driver Code
public static void main ( String [ ] args ) { int price [ ] = { 2 , 30 , 15 , 10 , 8 , 25 , 80 } ; int n = price . length ; System . out . print ( " Maximum ▁ Profit ▁ = ▁ " + maxProfit ( price , n ) ) ; } }