GlobalLogic interview question

They ask me to write the code to find max number from an array using bubble sort.