Problem 56533. Cricket - You Miss, I Hit (Rank Bowlers by Proportion of Bowled and LBW Wickets)
Which bowlers threaten your stumps the most? Given a table of all wickets taken during some particular set of matches and two thresholds, w and p, return a table of the bowlers who have taken at least w wickets with a proportional of at least p of those wickets being either bowled or LBW. The table returned should be sorted in descending order of this proportion. If bowlers share the same proportion, they should be ordered in descending order of total wickets.
The input table will have two variables, Bowler and Dismissal. Both are string vectors. The first is the names of the bowlers, the second is the type of wicket, which will be from the set: "bowled", "caught", "caught and bowled", "hit wicket", "lbw", "stumped".
The output table should have three variables: Bowler, Wickets, and WWProp. The first is the names of the bowlers (string), the second is the number of wickets taken by each bowler (double), and the third is the proportion of each bowler's wickets that were bowled or LBW.
For example, with thresholds of w = 2, p = 0.5:
Solution CommentsShow comments
Problem Recent Solvers13