Currently, the leaderboard data includes solved counts for Easy, Medium, and Hard problems, but does not include a total number of problems solved.
To improve data usability (e.g., for sorting and display), we should compute and include a totalSolved field for each user in the workflow that generates leaderboard data.
Expected Behaviour
- Each user object should include a new field:
totalSolved
totalSolved should be calculated as: easySolved + mediumSolved + hardSolved
- This field should be present in:
data/overall.json
data/daily.json
data/weekly.json
data/monthly.json
totalSolved should be recalculated after daily/weekly/monthly progress calculations
- Do not modify historical files inside the
data/daily/ directory or the logic that generates them
- This is the file that will need to be updated for this
Example
Before:
{
"name": "Harshad Bhalsing",
"id": "harsh-0_2",
"data": {
"easySolved": 1,
"mediumSolved": 7,
"hardSolved": 2
},
"score": 32
}
After:
{
"name": "Harshad Bhalsing",
"id": "harsh-0_2",
"data": {
"easySolved": 1,
"mediumSolved": 7,
"hardSolved": 2,
"totalSolved": 10
},
"score": 32
}
Currently, the leaderboard data includes solved counts for Easy, Medium, and Hard problems, but does not include a total number of problems solved.
To improve data usability (e.g., for sorting and display), we should compute and include a
totalSolvedfield for each user in the workflow that generates leaderboard data.Expected Behaviour
totalSolvedtotalSolvedshould be calculated as:easySolved + mediumSolved + hardSolveddata/overall.jsondata/daily.jsondata/weekly.jsondata/monthly.jsontotalSolvedshould be recalculated after daily/weekly/monthly progress calculationsdata/daily/directory or the logic that generates themExample
Before:
{ "name": "Harshad Bhalsing", "id": "harsh-0_2", "data": { "easySolved": 1, "mediumSolved": 7, "hardSolved": 2 }, "score": 32 }After:
{ "name": "Harshad Bhalsing", "id": "harsh-0_2", "data": { "easySolved": 1, "mediumSolved": 7, "hardSolved": 2, "totalSolved": 10 }, "score": 32 }