- Install Java 16 (or the latest) on your machine.
- Windows
- Install Chocolatey
choco install openjdk
- Mac/Linux
- Windows
- Clone/Fork ds-algo-starter
- Run this
./gradlew clean build
in theds-algo-starter
root directory. It should SUCCEED.
- Run this
- Your solutions goes into folder
src/main/java/
and corresponding tests goes intosrc/test/kotlin/
with same package name. - Test First approach.
- Start understanding the problem by thinking about test-cases that include positive tests, negative tests, corner cases etc
- Run tests using
gradle
as below
./gradlew test --tests [full-name-of-test-class]
For example
./gradlew test --tests leetcode.arrays.TopKFrequentWordsTest
Note: Below setup can be done in your free time. Don't get blocked by this. You may start coding with your IDEs initially if this is taking time
- Get rid of IDEs and use a text editor. Personal recommendation: VS Code
- Setup Java development on VS Code
- Install this VS Code Extension for writing tests in Kotlin