Coder Social home page Coder Social logo

leetcode's Introduction

Leetcode

Solution for problems in leetcode.com

How to contribute

Step 1: Picking up an issue

If working on an issue, comment first that you are working on it and then send out the pull request.

Step 2: Folder structure and conventions

Folder structure:

  1. If only single solution exists
    #<problem_number>/<programming_language>/<file_name>

Example

#200/java/Solution.java
  1. If more than one approach exist
    #<problem_number>/<programming_language>/<approach_algorithm_name>/<file_name>

Example

#354/java/dfs/Solution.java
#354/java/union_find/Solution.java
#354/kotlin/dfs/Solution.kt
#354/kotlin/union_find/Solution.kt
  1. The code should start with comment section having the problem link.

Example

/**
 * https://leetcode.com/problems/gas-station/
 */
 class Solution { .... }

Note: the algorithm name (if multiple words) follows snake case.

  1. In the comment section, after adding the problem link, add the runtime beat % and memory usage beats % provided by leetcode after submission of the code.

Example

/**
 * https://leetcode.com/problems/gas-station/
 * runtime beats 45.76% of Java submissions
 * memory usage beats 77.23% of Java submissions
 */
 class Solution { .... }

Step 3: Pull Request

  1. While sending out pull request, also attach proof of submission as accepted solution for the code.
  2. A single pull request should only address a single issue, i.e. solution for a single leetcode problem. It can include multiple files for multiple unique solutions(approaches) but only for a single problem.

What next?

  1. After sending out the PR, consider SLA of 2 days for review of the PR and getting a response back. In case of SLA failure, feel free to leave comment asking for review or merge.
  2. Feel free to open new issues for different leetcode questions. I will assign the hacktoberfest tag while you can send out PR without waiting.

leetcode's People

Contributors

aayush26 avatar chrisom79 avatar kushverma86 avatar manilal14 avatar mariojp avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.