you give positive integer array nums target lengthIn operation choose distinct index j 0 j numslength andset numsi numsi 2 andset numsj numsj 2two array consider similar frequency element samereturn minimum number operation require num similar target the test case generate num similar target Example 1input num 8126 target 21410output 2explanation it possible num similar target operation choose 0 j 2 num 10124 choose 1 j 2 num 10142it show 2 minimum number operation neededexample 2input num 125 target 413output 1explanation we num similar target operation choose 1 j 2 num 143example 3input num 11111 target 11111output 0explanation the array num similiar target Constraintsn numslength targetlength1 n 1051 numsi targeti 106it possible num similar target