Git Product home page Git Product logo

leetcode's Introduction

My LeetCode solutions

This repo contains my solutions to the problems of LeetCode, an online judge platform for preparing technical coding interviews. The problem statements can be found here. All the solutions are written in Java.

Organization

The solutions to a given problem are put in a separate folder with the name of the ID of that problem. For most of the problems, there is a single solution in a file named Solution.java. For some problems, there exist multiple solutions in files Solution_<method>.java, where <method> is a descriptive keyword to distinguish different approaches.

Some problems use custom structs. The definitions of these structs as classes are originally given in the code template as comments at the top. I removed them to keep my codes cleaner. (I seldom put comments in my code unless truly necessary) Instead, I put all the definition classes in the folder util/. This also makes it easier for local debugging.

Contributions

Some of my solutions may not be optimal in either memory or time efficiency. If you have found a better solution to any problems, you are welcome to post your solution by making a pull request. I will merge it into the repo with full attribution once I have them reviewed.

Problem Status

See this wiki page to view status for each problem.

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.