I will try to explain each step. Define a function which will take an argument of an integers elements array. A function is a set of instruction which execute a block of code, take input and expect ...