you give integer array arr you choose set integer remove occurrence integer arrayreturn minimum size set half integer array remove Example 1input arr 3333555227output 2explanation choose 37 new array 55522 size 5 ie equal half size old arraypossible set size 2 353252choosing set 27 possible new array 3333555 size great half size old arrayExample 2Input arr 777777output 1explanation the possible set choose 7 this new array Constraints2 arrlength 105arrlength even1 arri 105