alvinpiter / online-judge Goto Github PK
View Code? Open in Web Editor NEWA LeetCode clone built with NestJS & React.
Home Page: http://34.149.185.114/
A LeetCode clone built with NestJS & React.
Home Page: http://34.149.185.114/
Done criteria:
Done criteria:
Done criteria:
Done criteria:
Done criteria:
Last solve at
value on the Scoreboard:
Done criteria:
Done criteria:
strictNullChecks: true
to tsconfig.json
Done criteria:
Done criteria:
Done criteria:
ScoreboardWriterService
and ScoreboardReaderService
should use the generic EntitySorterService
ScoreboardModule
, named GlobalScoreboardModule
Diagnosis
Run the following query in the MySQL pod
SELECT table_schema, table_name,
ROUND((data_length+index_length)/POWER(1024,2),2) AS tablesize_mb
FROM information_schema.tables
ORDER BY tablesize_mb DESC LIMIT 20;
submission_run_details
table takes so much space. This is because we save the code execution output to it.
Solution
submission_run_details
called outputFileKey
. We will upload the code execution output to S3 instead.Done criteria:
Done criteria:
Done criteria:
Done criteria:
SortedSetService
should not receive sortedSetKey
in its constructor. It should be put in function's parameter, for example, SortedSetService.upsertMemberScore(sortedSetKey, member, score)
.EntitySorterService
should not receive order
in its constructor. The order
should be part of SortedEntitiesPaginationParameter
.Done criteria:
numberOfEntitiesPerPage
props to OffsetPaginationContextProvider
. Provide default value.Done criteria:
Done criteria:
Use the following payload from LeetCode as a guide:
{
"content": "<p>You are given two <strong>non-empty</strong> linked lists representing two non-negative integers. The digits are stored in <strong>reverse order</strong>, and each of their nodes contains a single digit. Add the two numbers and return the sum as a linked list.</p>\n\n<p>You may assume the two numbers do not contain any leading zero, except the number 0 itself.</p>\n\n<p> </p>\n<p><strong class=\"example\">Example 1:</strong></p>\n<img alt=\"\" src=\"https://assets.leetcode.com/uploads/2020/10/02/addtwonumber1.jpg\" style=\"width: 483px; height: 342px;\" />\n<pre>\n<strong>Input:</strong> l1 = [2,4,3], l2 = [5,6,4]\n<strong>Output:</strong> [7,0,8]\n<strong>Explanation:</strong> 342 + 465 = 807.\n</pre>\n\n<p><strong class=\"example\">Example 2:</strong></p>\n\n<pre>\n<strong>Input:</strong> l1 = [0], l2 = [0]\n<strong>Output:</strong> [0]\n</pre>\n\n<p><strong class=\"example\">Example 3:</strong></p>\n\n<pre>\n<strong>Input:</strong> l1 = [9,9,9,9,9,9,9], l2 = [9,9,9,9]\n<strong>Output:</strong> [8,9,9,9,0,0,0,1]\n</pre>\n\n<p> </p>\n<p><strong>Constraints:</strong></p>\n\n<ul>\n\t<li>The number of nodes in each linked list is in the range <code>[1, 100]</code>.</li>\n\t<li><code>0 <= Node.val <= 9</code></li>\n\t<li>It is guaranteed that the list represents a number that does not have leading zeros.</li>\n</ul>\n",
"mysqlSchemas": []
}
Done criteria:
How to reproduce:
This also happens in Submissions page, when we filter by user.
The cause is this. Every time we change the filter, we display the LoadingState
component, hence replacing the context provider.
Since the context provider rerenders, the whole component tree rerenders
Done criteria:
Done criteria:
<SelectField />
with <AutocompleteField />
in filter formsDone criteria:
Done criteria:
Done criteria:
Listen to submissionJudged
event. Upon judgment completion, calculate the user's score and upsert the score to Redis' sorted set. The calculation of user's score should use strategy pattern, so we can easily extend it with other calculation strategy.
Done criteria:
Done criteria:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.