Skip to content

mythkiven/leetcode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 

Repository files navigation

leetcode | LeetCode Solutions in Java, JS, C & Python3

Algorithm and coding-interview solution archive with runnable single-file examples in Python, C, Java, and JavaScript.

Keywords: leetcode solutions, coding interview python, leetcode c java, algorithm practice, data structures leetcode

Quick Start

# Python example
cd ./000.TwoSum/ && python3 Solution.py
# C example
cd ./000.TwoSum/ && gcc Solution.c -o Solution && ./Solution
# Java example
cd ./000.TwoSum/ && javac Solution.java && java Solution
# JavaScript example
cd ./000.TwoSum/ && node Solution.js

Prerequisites

Python 3, GCC, JDK, and Node.js for running the multi-language examples locally.

IDE: Open any 000.TwoSum/Solution.* file in VS Code for quick navigation across languages.

LeetCode

单个文件编译运行方法:

以 000.TwoSum 为例:
solution.c
    cd ./000.TwoSum/ && gcc Solution.c -o Solution && ./Solution
solution.py
    cd ./000.TwoSum/ && python3 Solution.py
solution.java
    cd ./000.TwoSum/ && javac Solution.java && java Solution
solution.js
    cd ./000.TwoSum/ && node Solution.js
或者使用vscode

LeetCode solutions in Python3、C、Java and JavaScript

Folder Layout

Each problem uses NNN.ProblemName/ (e.g. 000.TwoSum/) with Solution.py, Solution.c, Solution.java, and Solution.js when available.

NO. Title Solution Difficulty
000 Two Sum pythoncjavaJavaScript Easy

License

MIT — see LICENSE.

Contributing

Add a new NNN.ProblemName/ folder with language solutions, then update the table above.



公众号:

QQ交流群:

小程序:

博客: http://3code.info/

About

LeetCode solutions in Java, JavaScript, C, and Python3 — algorithm and interview prep archive.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors