Tech Mahindra interview question

Array manipulation and conversion og integer to binary number.