you give 0indexed integer array front back length n ith card positive integer frontsi print backsi print Initially card place table number face face you flip number card possibly zeroafter flip card integer consider good facing card face cardreturn minimum possible good integer flipping card if good integer return 0 example 1input front 12447 back 13413output 2explanationif flip second card face number 13447 face 124132 minimum good integer appear face face upit show 2 minimum possible good integer obtainable flip cardsexample 2input front 1 back 1output 0ExplanationThere good integer matter flip card return 0 Constraintsn frontslength backslength1 n 10001 frontsi backsi 2000