you give integer array arr Sort integer array ascend order number 1s binary representation case integer number 1s sort ascend orderreturn array sort Example 1input arr 012345678output 012483567explantion 0 integer 0 bits1248 1 bit356 2 bits7 3 bitsThe sorted array bit 012483567example 2input arr 10245122561286432168421output 12481632641282565121024explantion all integer 1 bit binary representation sort ascend order Constraints1 arrlength 5000 arri 104