Question: 1. a) Write out the pseudocode for a recursive algorithm that finds the largest difference between consecutive elements in a sequence. (Eg: The sequence (8,

1. a) Write out the pseudocode for a recursive algorithm that finds the largest difference between consecutive elements in a sequence. (Eg: The sequence (8, 2, 9, 5, 1) has the largest difference of | 2 - 9 | = 7)

b) Write out the pseudocode for a recursive algorithm that finds the number of negative integers in a sequence.

Clear steps needed for the pseudocode and algorithms MUST be recursive. Thanks!

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!