Java Programming Exercises

Demo

Java

During my fourth semester at Savonia University of Applied Sciences, I took a course on Data Structures and Algorithms. During this time, I learned Java programming and engaged in various class exercises, problem-solving tasks, and additional assignments. Here are the topics I covered:

The Following Topics Covered

  1. Introduction Task (Basics)

  2. Efficiency Analysis

  3. Sorting

  4. Lists

  5. Hash Table

  6. Binary Search Tree

  7. Heap

  8. Backtracking

Getting Started

To get started with this repository, follow the instructions below based on your operating system.

Prerequisites

Cloning the Repository

First, clone the repository to your local machine:

<font color="#c0504d">git clone</font> https://github.com/SAJIB3489/problem_solving-Java.git

cd problem_solving-Java

Debugging with IntelliJ IDEA

Windows Users

  1. Open IntelliJ IDEA:

Launch IntelliJ IDEA from your Start Menu or Desktop shortcut.

  1. Import the Project:

Go to File → Open… and navigate to the directory where you cloned the repository.

Select the project folder and click OK.

  1. Configure JDK:

IntelliJ might prompt you to configure the JDK if it’s not already set. Point to the JDK installation path (e.g., C:\Program Files\Java\jdk-17).

  1. Build the Project:

Go to Build → Build Project to compile the code.

  1. Run/Debug a Program:

Open the Java file you want to debug.

Set breakpoints by clicking on the left margin of the code editor.

Right-click inside the editor and select Debug .

IntelliJ will start the debugger, and execution will pause at the breakpoints you set. You can then step through the code, inspect variables, and evaluate expressions.

Linux Users

  1. Open IntelliJ IDEA:

Launch IntelliJ IDEA from your Applications menu or via terminal by typing intellij-idea-ultimate (or intellij-idea-community if you have the community edition).

  1. Import the Project:

Go to File → Open… and navigate to the directory where you cloned the repository.

Select the project folder and click OK.

  1. Configure JDK:

IntelliJ might prompt you to configure the JDK if it’s not already set. Point to the JDK installation path (e.g., /usr/lib/jvm/java-17-openjdk).

  1. Build the Project:

Go to Build → Build Project to compile the code.

  1. Run/Debug a Program:

Open the Java file you want to debug.

Set breakpoints by clicking on the left margin of the code editor.

Right-click inside the editor and select Debug .

IntelliJ will start the debugger, and execution will pause at the breakpoints you set. You can then step through the code, inspect variables, and evaluate expressions.

Note

You can download the full repository from my Github. Thank you.