you give array price pricesi price give stock ith dayfind maximum profit achieve you complete transaction like ie buy sell share stock multiple time follow restrictionsafter sell stock buy stock day ie cooldown dayNote you engage multiple transaction simultaneously ie sell stock buy Example 1input price 12302output 3explanation transaction buy sell cooldown buy sellExample 2input price 1output 0 Constraints1 priceslength 50000 pricesi 1000