Question: Write a function named isBoundedList that accepts an array of integers and its size. The function will determine whether the given array is a bounded

Write a function named "isBoundedList" that accepts an array of integers and its size. The function will determine whether the given array is a bounded list or not.

A bounded list is when the first number is the smallest and the last number is the largest or the first number is the largest and last number is the smallest. It will return true if it is and false otherwise.

For example, if the array is {111, 333, 222, 444} or {444, 222, 333, 111}, it will return true. If the array is {222, 333, 444, 111} or {444, 111, 333, 222}, it will return false.

Please note that an array of only one number will always return true.

Please write in C++

Array Notation

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!