Skip to content

Naxisbeast/data-structures-and-algorithms-java

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Data Structures and Algorithms in Java

Overview

This repository is a student learning portfolio for core data structures and algorithms using Java. The goal is to write clean, readable code that shows my understanding of programming fundamentals without turning the project into an over-engineered library.

I am building this as part of my GitHub student portfolio for bursaries, internships, graduate programmes, and future Honours opportunities.

Why I Created This Repository

Data structures and algorithms are important for problem solving, technical interviews, and deeper computer science study. This repository helps me practise the basics in a way that I can explain clearly.

Current Scope

This foundation repo currently includes cleaned Java examples for foundational data structures and recursion, plus README summaries for selected academic assignment exercises.

Current topics include:

  • Singly linked list
  • Stack using an array
  • Queue using an array
  • Basic recursion examples
  • Introductory time complexity notes
  • Academic assignment archive READMEs

Academic Assignment Archive

This repository also includes an assignments/ section for selected past CMPG221 learning exercises. These folders are not a raw coursework dump. They contain clean summaries written in my own words, with space reserved for source files that may be added later after review.

The goal of this section is to show learning progress in object-oriented programming, arrays, linked lists, recursion, stacks, sorting, and complexity analysis while keeping the work ethical and professional. I do not include student numbers, private submission screenshots, academic portal screenshots, or full university instruction PDFs.

Current assignment summaries:

  • Assignment 1: OOP inheritance and polymorphism
  • Assignment 2: OOP arrays, sorting, and complexity
  • Assignment 3: Text-based Snake with MyArrayList
  • Assignment 4: Music festival booking with MyLinkedList
  • Assignment 5: Hospital emergency room system with linked-list stack and queue
  • Assignment 6: Recursion, stack tracing, and string permutations
  • Assignment 7: Hybrid sorting algorithm

Concepts Covered

Concept What It Demonstrates
Singly linked list Nodes, references, insertion, removal, traversal
Stack using array LIFO behaviour, push, pop, peek, overflow and underflow checks
Queue using array FIFO behaviour, enqueue, dequeue, peek, circular array indexing
Recursion Base cases, recursive calls, factorial, Fibonacci, array summing
Time complexity Simple Big O reasoning for common operations

Repository Structure

1. Core DSA Implementations

The src/ folder contains cleaned Java examples written specifically for portfolio learning. These examples are beginner-to-intermediate implementations that focus on readability, simple edge-case handling, and clear demonstration of core concepts.

Current core examples include:

  • SinglyLinkedList
  • StackUsingArray
  • QueueUsingArray
  • RecursionExamples
  • Main demo runner

2. Academic Assignment Archive

The assignments/ folder contains selected past academic learning exercises. These are summarized ethically and cleaned for public viewing rather than uploaded as raw coursework dumps.

Each assignment folder includes a README written in my own words, with source folders reserved for reviewed code. No private submission screenshots, student numbers, academic portal screenshots, or original instruction PDFs are included.

3. Notes

The notes/ folder contains supporting study notes. The current notes include a simple time complexity note explaining Big O, best/average/worst cases, and the complexity of the current structures.

data-structures-and-algorithms-java/
|-- README.md
|-- assignments/
|   |-- assignment-01-oop-inheritance-polymorphism/
|   |   |-- README.md
|   |   `-- src/
|   |-- assignment-02-oop-array-sorting-complexity/
|   |   |-- README.md
|   |   `-- src/
|   |-- assignment-03-snake-myarraylist/
|   |   |-- README.md
|   |   `-- src/
|   |-- assignment-04-music-festival-linkedlist/
|   |   |-- README.md
|   |   `-- src/
|   |-- assignment-05-hospital-er-stack-queue/
|   |   |-- README.md
|   |   `-- src/
|   |-- assignment-06-recursion-stack-permutations/
|   |   |-- README.md
|   |   `-- src/
|   `-- assignment-07-hybrid-sorting/
|       |-- README.md
|       `-- src/
|-- notes/
|   `-- time-complexity.md
`-- src/
    |-- examples/
    |   `-- Main.java
    |-- linkedlists/
    |   `-- SinglyLinkedList.java
    |-- queues/
    |   `-- QueueUsingArray.java
    |-- recursion/
    |   `-- RecursionExamples.java
    `-- stacks/
        `-- StackUsingArray.java

How To Compile And Run

From the repository root:

mkdir out
javac -d out src/linkedlists/SinglyLinkedList.java src/stacks/StackUsingArray.java src/queues/QueueUsingArray.java src/recursion/RecursionExamples.java src/examples/Main.java
java -cp out examples.Main

If you are using VS Code or IntelliJ, open the repository folder and run src/examples/Main.java.

What I Learned

  • How linked lists store values using nodes and references.
  • How stacks and queues use different access patterns.
  • How edge cases such as empty structures and full arrays affect code.
  • How recursion depends on a clear base case.
  • How to describe simple time complexity using Big O notation.

Planned Extensions

This repository currently focuses on foundation examples. Future improvements may include:

  • Doubly linked list
  • Stack using linked list
  • Queue using linked list
  • Searching algorithms
  • Sorting algorithms
  • Binary search tree
  • Basic unit tests for the core data structures

About

Java Data Structures and Algorithms Practice

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages