Question: Write a python function numIncreasing that takes as input a tuple of numbers and returns the first sequence within the tuple that is increasing order

Write a python function numIncreasing that takes as input a tuple of numbers and returns the first sequence within the tuple that is increasing order and has length at least 2.

You can assume such an increasing sequence always exists. For example:

(5, 2, 1, 3, 4) returns (1, 3, 4), because only the latter 3 are in increasing order

(2, 1, 4, 5, 6) returns (1, 4, 5, 6)

(1, 8, 9, 10, 100) returns (1, 8, 9, 10, 100)

(4, 1, 2, 3, 4, 1, 2, 3) returns (1, 2, 3, 4)

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!