Code Optimization: Finding the correct spot on the leaderboard

Imagine you’re running a sports competition with multiple competitions going on and you need to keep track of the top 10 fastest scores across all disciplines. As each athlete finishes competing in one or more games they want to know what their spot on the leaderboard is. What’s the fastest way to compute this across a range of competitions? Given a n x m matrix like you can see below where the rows are the disciplines and columns the top 10 spots, figure out where player p ranks in all disciplines based on their times....

2023-10-28 · 8 min · Maurice Borgmeier