Skip to content

starforever/leetcode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

My LeetCode solution

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages