you give 0indexe array num cost consist n positive integersyou follow operation number timesincrease decrease element array num 1the cost operation ith element costiReturn minimum total cost element array num equal Example 1input num 1352 cost 23114output 8explanation we element equal 2 follow way increase 0th element time the cost 2 Decrease 1st element time the cost 3 Decrease 2nd element time the cost 1 1 1 3the total cost 2 3 3 8it show array equal small costExample 2input num 22222 cost 42813output 0explanation all element equal operation need Constraintsn numslength costlength1 n 1051 numsi costi 106