you give array price pricesi price give stock ith day integer fee represent transaction feefind maximum profit achieve you complete transaction like need pay transaction fee transactionnote you engage multiple transaction simultaneously ie sell stock buy Example 1input price 132849 fee 2output 8explanation the maximum profit achieve buy prices0 1 sell prices3 8 buying prices4 4 selling prices5 9the total profit 8 1 2 9 4 2 8example 2input price 1375103 fee 3output 6 Constraints1 priceslength 5 1041 pricesi 5 1040 fee 5 104