The pseudocode of the program serves as a prototype of the program
The pseudocode of the program is as follows:
The above pseudocode gets input for the array; then sorts the array before performing the required operations
Read more about pseudocodes at:
https://brainly.com/question/24735155