Collection of leetcode & codeforces problems solved using java-8, java-17 & rust
The project uses leetcode-editor plugin for IntelliJ which fetches the problem locally and has ability to run & even submit the solution from the IDE itself
This project supports building and running Java and Kotlin solutions using Bazel.
You can build and run any solution target directly using:
bazel run //<module-directory>:<ProblemName>For example:
bazel run //leetcode-kotlin:TwoSumWhen you add a new problem solution file under a JVM module, update the main_srcs parameter inside the module's BUILD.bazel file:
kotlin_problem_targets(
name = "leetcode_kotlin",
main_srcs = [
...
"src/main/kotlin/com/kshitijpatil/leetcode/editor/en/NewProblem.kt",
],
)If you add helper or support classes (like custom data structures, Fast I/O helpers) that are imported by other solution files:
- List them under the
support_srcsparameter of the macro. - The macro will compile them into a shared library that all
main_srcstargets depend on automatically.
For example:
java_problem_targets(
name = "codeforces_java8",
support_srcs = [
"src/main/java/IO.java",
"src/main/java/IntMath.java",
],
main_srcs = [
...
],
)