Question: Write a function in Python: When given a list, the function returns the largest increase from one item to the next item and the last
- Write a function in Python:
- When given a list, the function returns the largest increase from one item to the next item and the last duplicate numbers in a row.
- Sample of what is meant:
Given: nums1 = [2, 4, 4, 1, 8, 8, 10]
Returns 7 for the largest increase and 8 for the last duplicate numbers in a row.
Given: nums2 = [500, 500, 400, 800, 900, 900, 1500, 700]
Returns 600 for the largest increase and 900 for the last duplicate numbers in a row.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
