Question: List Going Down All numbers going down Problem Problem: Write a method that will check a list to see if all values are in decreasing

List Going Down

All numbers going down

Problem

Problem: Write a method that will check a list to see if all values are in decreasing order. Return true if all values are decreasing. Return false if all values are not decreasing.

Data: A list containing 0 or more values. The list will not point at null.

Output: Return true or false.

Sample Data 7, 2, 1 11, 5, 6, 7, 1 7 11, -11 11, 5, 6, 3, 11, 6, 7, 11 Sample Output true false true true false

Starter code: Submit your code boolean go( List ray ) { // your code goes here }

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!