Algorithms-Leetcode-Javascript
Algorithms-Leetcode-Javascript copied to clipboard
Submit a Leetcode problem
Pick a problem in Leetcode or any other platform.
If you find a solution, follow the next steps:
Open A PR that contains:
- Solution in a file with a description of the problem at the top.
- A test file with some test cases. The test file must export a
test()
function which will run all the tests of the file. - An entry of the problem in the list of solutions within the README file.
PR Example: https://github.com/ignacio-chiazzo/Algorithms-Leetcode-Javascript/pull/39
If you don't find a solution but want to discuss a problem, I would be happy to! In that case, please submit an issue.
i would like to work on this issue. Please assing it to me
Hey! Thanks for showing interest!
This issue is generic. Feel free to grab any problem that is not in this repo and work on it. You can also submit an issue while you're tackling the problem.
hey, I would like to contribute my leetcode problems solutions in this repo! can you pls explain the 2nd point "The test file must export a test() function which will run all the tests of the file."
Hey thank you!
can you pls explain the 2nd point "The test file must export a test() function which will run all the tests of the file."
Sure, the PR needs to have a test file that tests a few scenarios. The file should have a main function test
that is exported.
See example:
https://github.com/ignacio-chiazzo/Algorithms-Leetcode-Javascript/pull/39/files#diff-cc64c97de04332133c060ff52dd0c575e035b6e488f64e6f35229fc5673bf1e2R45-R51
const assert = require('assert');
const { theNewProblem } = require('../LeetcodeProblems/The_New_Problem.js');
function test() {
// Test a few scenarios here like this:
assert.strictEqual(theNewProblem, [.....]);
}
module.exports.test = test
@deepesh85b you are welcome to contribute. No need to be assigned to this issue to work on it :). Thank you!
Hey ! Could you please assign this ask to me i would like to contribute in this project
@kav1239 you are welcome to contribute. No need to be assigned to this issue to work on it :). Thank you!
Hi dear, can u assign me and please add the October label to confirm and start my contribution