edited by
516 views
2 votes
2 votes
At the end of its fifth successful season, the Siruseri Premier League is planning to give an award to the Most Improved Batsman over the five years. For this, an Improvement Index will be computed for each batsman. This is defined as the longest sequence of increasing scores by the batsman among all his scores over the five seasons. For example, if the scores for a batsman over the five seasons are $(20, 23, 6, 34, 22, 52, 42, 67, 89, 5, 100)$, his Improvement Index is $7$ based on the sequence $(20, 23, 34, 52, 67, 89, 100)$. Describe an efficient algorithm based on dynamic programming to compute the Improvement Index for a batsman with an overall sequence of $n$ scores. Analyze the complexity of your algorithm.
edited by

1 Answer

Related questions

2 votes
2 votes
2 answers
1
3 votes
3 votes
2 answers
2
go_editor asked May 27, 2016
618 views
Consider the code below, defining the function $A$:A(m, n, p) { if (p == 0) return m+n; else if (n == 0 && p == 1) return 0; else if (n == 0 && p == 2) return 1; else if ...
3 votes
3 votes
2 answers
3
3 votes
3 votes
2 answers
4