you give integer array price pricesi price give stock ith day integer kFind maximum profit achieve you complete k transactionsnote you engage multiple transaction simultaneously ie sell stock buy Example 1input k 2 price 241output 2explanation Buy day 1 price 2 sell day 2 price 4 profit 42 2example 2input k 2 price 326503output 7explanation Buy day 2 price 2 sell day 3 price 6 profit 62 4 then buy day 5 price 0 sell day 6 price 3 profit 30 3 Constraints1 k 1001 priceslength 10000 pricesi 1000