Skip to content

Classical algorithms and data structures, such as searching and sorting algorithms, linked list, binary tree, stack, with my implementation in Java utilizing Generics. Test programs are written as junit test cases.

Notifications You must be signed in to change notification settings

QE-Playground/JAlgoData

Repository files navigation

Algorithms & Data Structures Sandbox In Java

A sanbox for classical algorithms, such as searching and sorting algorithms, and classical data structures eg. linked list, with my implementation in Java.

All classes and methods would be implemented with generic programming mindset, for instance you can define:

SinglyLinkedList<Integer> listInt;
SinglyLinkedList<String>  listString;

Looks pretty similar to List of java.util.list right? In fact my implementation is somewhat naive, thus help you understand the primer of Java Generics.

Test programs are written as junit test cases.

How to run test programs?

All you need are Oracle JDK 8, and IntelliJ IDEA Community Edition 2020. Cloning my repo using the Git integration inside IntelliJ IDEA, and let the IDE configures automatically.

In this repo I have

Searching algorithms:

  • Generic Linear search.
  • Generic Binary search.

Sorting algorithms:

  • Generic Selection sort.
  • Generic Insertion sort.
  • Generic Binary insertion sort.
  • Generic Interchange sort.
  • Generic Bubble sort.
  • Generic Shaker sort.
  • Generic Heap sort.
  • Generic Shell sort.
  • Generic Quick sort.
  • Generic Merge sort.
  • Radix sort (still not generic).

Data structures:

  • Generic Singly Linked List.
  • Generic Doubly Linked List.
  • Generic Binary tree.
  • Generic Stack.

References:

[1] Tran Hanh Nhi, Duong Anh Duc - Introduction to data structures and algorithms (textbook in HCMUS's library, 2003).

[2] N.Wirth - Algorithms + Data structures = Programs (Prentice Hall, 1976).

[3] Generic Types, Oracle Java Documentation.

Donations:

If you think that any information you obtained here is worth of some money and are willing to pay for it, feel free to send any amount through paypal.

paypal

About

Classical algorithms and data structures, such as searching and sorting algorithms, linked list, binary tree, stack, with my implementation in Java utilizing Generics. Test programs are written as junit test cases.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages