Skip to content

jincminst/LeetCode-Java

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 

Repository files navigation

LeetCode-Java

All my Java solutions for Leetcode problems

To see a solution, follow these steps:

  1. Go to SOURCE ROOT.
  2. Go to the directory with the name of the problem (e.g. twoSum)
  3. Open the Solution file.

To run a file, follow these steps:

  1. Clone the repository using git clone https://github.com/EmeraldTiub/LeetCode-Java
  2. Make sure you have something to run the Java file (IntelliJ, whatever you have.)
  3. Uncomment the main() method in any one of the Solution files.
  4. Look for a section labeled "Create a testcase." in the main() method.
  5. Change the testcase to something that matches the description of the problem (description.txt)
  6. Run the Java file.

If you want to actually put it into a Leetcode editor, follow these steps:

  1. Open the file you want to put into the Leetcode editor.
  2. Put the entire script into the Leetcode editor for that problem.
  3. Delete out the first line (looks like this: package [something];)
  4. Delete the main() method.
  5. The code should be able to run inside the Leetcode editor.

Note: Copy ALL of the code, not just up until the end of the last function. Note: If there's some amount of folders that say "thisProblem" and "thisProblem2" and "thisProblem3" or something, that means I have different approaches for that problem. Note: JavaTesting is for testing Java features.

Java Problem Count: 1 (I add one every time I finish all approaches for a problem.)

About

Leetcode problems done in java

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages