{"id":21171500,"url":"https://github.com/tebogoyungmercykay/data_structures_and_algorithms_in_java","last_synced_at":"2025-04-13T15:05:00.529Z","repository":{"id":148418086,"uuid":"524668699","full_name":"TebogoYungMercykay/Data_Structures_and_Algorithms_in_Java","owner":"TebogoYungMercykay","description":"Java is a widely used object-oriented programming language and software platform that runs on billions of devices, including notebook computers, mobile devices, gaming consoles, medical devices and many others. The rules and syntax of Java are based on the C and C++ languages.","archived":false,"fork":false,"pushed_at":"2024-10-12T16:34:09.000Z","size":125,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"dev","last_synced_at":"2025-04-13T15:04:45.248Z","etag":null,"topics":["avl-tree","btree","graph","hashmap","head","java","makefile","self-or","skiplists","sorting","userinput"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/TebogoYungMercykay.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-08-14T12:44:04.000Z","updated_at":"2024-10-12T16:31:46.000Z","dependencies_parsed_at":"2024-11-20T16:06:31.016Z","dependency_job_id":"fd613fe4-58f2-4e4c-95df-d9ae0ed9b243","html_url":"https://github.com/TebogoYungMercykay/Data_Structures_and_Algorithms_in_Java","commit_stats":null,"previous_names":["tebogoyungmercykay/data_structures_and_algorithms_in_java"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TebogoYungMercykay%2FData_Structures_and_Algorithms_in_Java","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TebogoYungMercykay%2FData_Structures_and_Algorithms_in_Java/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TebogoYungMercykay%2FData_Structures_and_Algorithms_in_Java/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TebogoYungMercykay%2FData_Structures_and_Algorithms_in_Java/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TebogoYungMercykay","download_url":"https://codeload.github.com/TebogoYungMercykay/Data_Structures_and_Algorithms_in_Java/tar.gz/refs/heads/dev","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248732483,"owners_count":21152852,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["avl-tree","btree","graph","hashmap","head","java","makefile","self-or","skiplists","sorting","userinput"],"created_at":"2024-11-20T16:06:39.876Z","updated_at":"2025-04-13T15:05:00.503Z","avatar_url":"https://github.com/TebogoYungMercykay.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Data Structures And Algorithms In Java\r\n\r\nThis project focuses on implementing various data structures and algorithms in Java. Below are the requirements, installation instructions, and details on how to run the code efficiently using a terminal or an IDE.\r\n\r\n---\r\n\r\n## Requirements Before Running Code\r\n\r\n1. **Java Development Kit (JDK) Installation**  \r\n   You need to install JDK to compile and run Java code. JDK 17 is recommended. Here are some tutorials to help with setup:\r\n   \r\n   - **Install Java JDK 17 on Windows 11:**  \r\n     Follow this YouTube tutorial to install JDK 17:  \r\n     [How to Install Java JDK 17 on Windows 11](https://www.youtube.com/watch?v=ykAhL1IoQUM\u0026t=136s)\r\n\r\n   - **Setup WSL (Windows Subsystem for Linux) and Run It from Visual Studio Code:**  \r\n     If you're using WSL, you can run the Ubuntu terminal shell directly from Visual Studio Code. Learn how to set it up using this guide:  \r\n     [Setup WSL and Run from VS Code](https://www.youtube.com/watch?v=fp45HpZuhS8\u0026t=112s)\r\n\r\n2. **Installing Oracle JDK on Windows Subsystem for Linux (WSL)**  \r\n   If you're working in a WSL environment, follow these steps to install Oracle JDK:\r\n\r\n   - Run the WSL terminal as **Administrator**.\r\n   - Set necessary permissions and variables:\r\n   \r\n     ```bash\r\n     set -ex\r\n     export JDK_URL=http://download.oracle.com/otn-pub/java/jdk/8u131-b11/d54c1d3a095b4ff2b6607d096fa80163/jdk-8u131-linux-x64.tar.gz\r\n     export UNLIMITED_STRENGTH_URL=http://download.oracle.com/otn-pub/java/jce/8/jce_policy-8.zip\r\n     ```\r\n\r\n   - Download the JDK and unzip the archive:\r\n\r\n     ```bash\r\n     wget --no-cookies --header \"Cookie: oraclelicense=accept-securebackup-cookie\" ${JDK_URL}\r\n     tar -xzvf jdk-*.tar.gz\r\n     rm -fr jdk-*.tar.gz\r\n     ```\r\n\r\n   - Move the JDK to the correct directory and configure it:\r\n\r\n     ```bash\r\n     sudo mkdir -p /usr/lib/jvm\r\n     sudo mv jdk1.8* /usr/lib/jvm/oracle_jdk8\r\n     wget --no-cookies --header \"Cookie: oraclelicense=accept-securebackup-cookie\" ${UNLIMITED_STRENGTH_URL}\r\n     unzip jce_policy-8.zip\r\n     mv UnlimitedJCEPolicyJDK8/local_policy.jar /usr/lib/jvm/oracle_jdk8/jre/lib/security/\r\n     mv UnlimitedJCEPolicyJDK8/US_export_policy.jar /usr/lib/jvm/oracle_jdk8/jre/lib/security/\r\n     ```\r\n\r\n   - Configure alternatives for Java and Javac:\r\n\r\n     ```bash\r\n     sudo update-alternatives --install /usr/bin/java java /usr/lib/jvm/oracle_jdk8/jre/bin/java 2000\r\n     sudo update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/oracle_jdk8/bin/javac 2000\r\n     ```\r\n\r\n   - Set environment variables:\r\n\r\n     ```bash\r\n     sudo echo \"export J2SDKDIR=/usr/lib/jvm/oracle_jdk8\r\n     export J2REDIR=/usr/lib/jvm/oracle_jdk8/jre\r\n     export PATH=$PATH:/usr/lib/jvm/oracle_jdk8/bin:/usr/lib/jvm/oracle_jdk8/db/bin:/usr/lib/jvm/oracle_jdk8/jre/bin\r\n     export JAVA_HOME=/usr/lib/jvm/oracle_jdk8\r\n     export DERBY_HOME=/usr/lib/jvm/oracle_jdk8/db\" | sudo tee -a /etc/profile.d/oraclejdk.sh\r\n     ```\r\n\r\n   \u003e **Note**: You can update the links for other JDK versions if needed.\r\n\r\n---\r\n\r\n## About the Code\r\n\r\n- All the code is written by me as part of my practice, assignments, and coding modules in computer science.\r\n- This repository includes implementations of data structures like binary search trees, and various algorithms, all coded in Java.\r\n\r\n---\r\n\r\n## About Me\r\n\r\n- **Tebogo Sello Selepe**  \r\n  Currently studying **Computer Sciences** at the **University of Pretoria** (Tuks).\r\n\r\n---\r\n\r\n## How to Compile and Run the Code\r\n\r\nYou can use the provided `Makefile` to compile and run the Java code from the terminal. Follow these steps:\r\n\r\n1. **Ensure JDK is installed**: Make sure you have JDK installed and properly set up on your system (refer to the Requirements section above).\r\n\r\n2. **Clone or download the project**:  \r\n   Open a terminal and navigate to the project directory.\r\n\r\n3. **Use the following commands** to clean, compile, and run the project:\r\n\r\n   - **Clean the project**:\r\n     ```bash\r\n     make clean\r\n     ```\r\n\r\n   - **Compile the project**:\r\n     ```bash\r\n     make\r\n     ```\r\n\r\n   - **Run the project**:\r\n     ```bash\r\n     make run\r\n     ```\r\n\r\n## Makefile\r\n\r\nHere's the `Makefile` to automate the build process:\r\n\r\n```makefile\r\ndefault:\r\n\tjavac *.java\r\n\r\nrun:\r\n\tjava Main\r\n\r\nclean:\r\n\trm -f *.class\r\n\treset\r\n\tclear\r\n\r\ntar:\r\n\ttar -cvz *.* -f Java_Filename.tar.gz\r\n\t\r\nuntar:\r\n\ttar -zxvf *.tar.gz\r\n```\r\n\r\n\u003e **Note**: The default command compiles all `.java` files, and the `run` command executes the `Main` class. Modify the class name in the `run` command if the entry point is different.\r\n\r\n---\r\n\r\n## Contributing\r\n\r\nThis project is mainly for educational purposes. However, if you have suggestions or improvements, feel free to open an issue or submit a pull request.\r\n\r\n---\r\n\r\n## License\r\n\r\nThis project is open source. Please check the repository for more specific license details.\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftebogoyungmercykay%2Fdata_structures_and_algorithms_in_java","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftebogoyungmercykay%2Fdata_structures_and_algorithms_in_java","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftebogoyungmercykay%2Fdata_structures_and_algorithms_in_java/lists"}