If you are a CS2040S student, your IDEA configurations should already be compatible with this project structure. Feel free to clone and use it as you see fit. The configuration below is as per CS2040S PS1 set-up guide.
-
Choose Java Version 11.0.XX for Project SDK
- Download from Oracle
- Create account and login if necessary
- Make sure to download the correct version compatible with your hardware
-
Download IntelliJ (Community Edition) from JetBrains if you do not have it
-
Fork the repo and clone it on your local device
git clone https://github.com/YOUR_USERNAME/data-structures-and-algorithms.git cd data-structures-and-algorithms -
Launch IntelliJ on your device and under the
Projectstab, clickOpen. Navigate to where the local repo is cloned- Configure to Java SDK (if not done) by heading to
Fileon the top-left panel - Click on
Project Structure... - Apply the desired Java SDK in the
SDK:dropdown. Remember to clickApply
- Configure to Java SDK (if not done) by heading to
-
Test if everything is properly set-up with the command:
./gradlew clean testAll files should be compiled and all test cases should pass.
src/
├── main/java/
│ ├── dataStructures/ # Data structure implementations
│ └── algorithms/ # Algorithm implementations
├── test/java/ # JUnit tests
scripts/ # Custom input runners
docs/ # Documentation
# Run all tests
./gradlew test
# Run specific test class
./gradlew test --tests "dataStructures.avlTree.*"
# Clean and rebuild
./gradlew clean buildBefore contributing, ensure your code passes style checks:
# Check main source code style
./gradlew stylecheckMain
# Check test code style
./gradlew stylecheckTestTo run algorithms with custom inputs, see the scripts folder.