give array integer arr lucky integer integer frequency array equal valuereturn large lucky integer array if lucky integer return 1 Example 1input arr 2234output 2explanation the lucky number array 2 frequency2 2example 2Input arr 122333output 3explanation 1 2 3 lucky number return large themExample 3input arr 22233output 1explanation there lucky number array Constraints1 arrlength 5001 arri 500