Algorithms-Leetcode-Javascript icon indicating copy to clipboard operation
Algorithms-Leetcode-Javascript copied to clipboard

Submit a Leetcode problem

Open ignacio-chiazzo opened this issue 2 years ago • 10 comments

Pick a problem in Leetcode or any other platform.

If you find a solution, follow the next steps:

Open A PR that contains:

  1. Solution in a file with a description of the problem at the top.
  2. A test file with some test cases. The test file must export a test() function which will run all the tests of the file.
  3. 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.

ignacio-chiazzo avatar Oct 02 '22 13:10 ignacio-chiazzo

i would like to work on this issue. Please assing it to me

piyush-sri avatar Oct 02 '22 18:10 piyush-sri

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.

ignacio-chiazzo avatar Oct 02 '22 22:10 ignacio-chiazzo

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."

Faizan96322 avatar Oct 03 '22 17:10 Faizan96322

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

ignacio-chiazzo avatar Oct 03 '22 17:10 ignacio-chiazzo

@deepesh85b you are welcome to contribute. No need to be assigned to this issue to work on it :). Thank you!

ignacio-chiazzo avatar Oct 16 '22 22:10 ignacio-chiazzo

Hey ! Could you please assign this ask to me i would like to contribute in this project

kav1239 avatar Oct 20 '22 15:10 kav1239

@kav1239 you are welcome to contribute. No need to be assigned to this issue to work on it :). Thank you!

ignacio-chiazzo avatar Oct 20 '22 15:10 ignacio-chiazzo

Hi dear, can u assign me and please add the October label to confirm and start my contribution

ijaz-ali-dev avatar Oct 22 '22 20:10 ijaz-ali-dev