Question: how to write a function that takes a tuple of integers and returns the longest contiguous sequence of this tuple in which the numbers occur

how to write a function that takes a tuple of integers and returns the longest contiguous sequence of this tuple in which the numbers occur in ascending order without built in( functions). For example, if the tuple is: (97,122,99,98,111,98,111,98,101,103,103,104,97,107,108) then the function should return (98,101,103,103,104)

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 Programming Questions!