On Wed, Jul 20, 2016 at 2:11 PM, monik...@netzero.net <monik...@netzero.net> wrote: > Hi: > Can somebody please provide answer to following python programming question? > I have spent days on it and cannot come up with any code that would make any > sense for it so I cannot provide you any code. But I would appreciate the > answer very much, if not in python, then in pseudo code. > Thank you very much > Monika > > Here is the problem: > Given a list of integers, return the progress of the test > The progress is defined as the length of the longest run of strictly > increasing scores "with gaps allowed".
If I understand the question being asked, this is often presented as an exercise for the technique of "dynamic programming". https://en.wikipedia.org/wiki/Dynamic_programming However, your question hasn't used the term "dynamic programming". Are you familiar with this term? If so, have you been exposed to other problems that can be solved with "dynamic programming"? Your problem is a rough restatement of the "longest increasing subsequence" problem. https://en.wikipedia.org/wiki/Longest_increasing_subsequence Unfortunately, solving this problem is a bit out of scope for Python tutor because it's more advanced than the material we typically talk about here (basic Python programming). I don't think we can help very much. You may get better help by talking with your instructor or study group. _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor