Question: Develop and write pseudo code for an algorithm to do following steps: Find the maximum number from an array of size n. Find the minimum
- Develop and write pseudo code for an algorithm to do following steps:
- Find the maximum number from an array of size n.
- Find the minimum number from the same array of size n.
- Find the difference between the largest and the smallest elements of the array.
- Count that how many elements of the array are bigger than the difference computed in the previous step and output that number.
- Analyze your algorithm and find its complexity class.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
