Skip to content

Latest Articles

Stack vs. Queue

June 8, 2022What are the differences between the stack and queue data structures? How do the corresponding Java interfaces and classes differ?

Tree Data Structure

The following articles describe various tree data structures. A tree is a hierarchical structure with a root node and its children, which in turn can have children of their own and thus form subtrees.

Shortest Path Algorithms

Pathfinding or shortest path algorithms are used to find a path (or the shortest path) between two nodes within a graph.

What you’ll learn:

  • What is the difference between “shortest path” and “pathfinding”?
  • Which pathfinding algorithms are there?
  • How do the most important pathfinding algorithms work (explained step by step)?
  • When do you use which algorithm?
  • How to determine the time complexities of the pathfinding algorithms?
  • How to implement pathfinding algorithms in Java?
  • What are “negative cycles” and how are they identified?

Algorithms and Data Structures in General

This category covers general articles about algorithms without any specific type of algorithm in mind, e.g., classifications of algorithms.

Sorting Algorithms

If you need a refresher on how the most common sorting algorithms work and how they differ, this series is for you.

What you’ll learn:

  • What are the most common sorting methods?
  • In which characteristics do they differ?
  • How to sort arrays and collections in Java?
  • How each sorting algorithm works (using lots of visualizations and examples).
  • How to derive a sorting algorithm’s time complexity, without complicated maths.
  • How to implement each sorting algorithm in Java.

Sorting Algorithms [Ultimate Guide]

The most important sorting algorithms compared: time complexity, space, and stability from Insertion Sort to Radix Sort – with a table and short explanations.
Big O cheat sheet – the 7 time complexity classes on one page

Free Bonus:

Big O Cheat Sheet

[7 Time Complexity Classes on 1 Page]

Use this 1-page PDF cheat sheet as a reference to quickly look up the seven most important time complexity classes (with descriptions and examples).

You get access to this PDF by signing up for my newsletter. I won’t send any spam, and you can opt-out at any time.

Stack

In this tutorial series, you will learn everything about the abstract data type “stack”, how to use it, and how to implement your own stack classes in Java.

Stack Data Structure

In this tutorial, you will learn everything about the abstract data type “stack”, how to use it, and how to implement your own stack in Java.

Stack Implementation in Java

In this tutorial, you will learn how to implement a stack in Java – with an ArrayDeque, an Array, a LinkedList and a Queue.

Implement a Stack Using an Array

How to implement a stack based on an array in Java (without Java Collections classes)? How do you make the array grow on demand?

Reverse a Stack Using Recursion

How to reverse the order of the elements in a stack using recursion (i.e., without iteration)? Tutorial with images and Java code examples.

Stack vs. Queue

What are the differences between the stack and queue data structures? How do the corresponding Java interfaces and classes differ?

Queue

In this tutorial series, you will learn everything about the abstract data type “queue”, which methods it provides, how to use queues, when to use which queue implementation and how to program your own queues in Java.

Queue Data Structure

In this tutorial, you will learn everything about the abstract data type “Queue”, enqueue and dequeue operations, using illustrative Java examples.

Deque

In this tutorial series, you will learn everything about the abstract data type “deque”, which methods it provides, how to use deques, when to use which deque implementation and how to program your own deques in Java.

Deque Data Structure

In this tutorial, you will learn everything about the abstract data type “deque”, which deques exist in Java, and how to implement deques yourself.

Java Deque vs. Stack

What are the differences between the data structures and Java classes Deque and Stack? Why should we use only Deque in Java?

Java Queue vs. Deque

What are the differences between the data structures deque and queue? And how do the corresponding Java interfaces differ?

Data Structures in Java

What are data structures? A data structure is a collection of related data values and their relationships with each other. It provides operations to read or modify the data.

Java data structures are, for example, collections, maps, and sets, trees, queues, deques, and stacks.

Array Length in Java

How to find the length of an array in Java? How do you set the length? How much memory does an array occupy and what is the maximum size?

Stack, Queue, Deque in Java

How do the stack, queue and deque data structures work? Which implementations are available in the JDK? Which one should you use when?

Advent of Code

In the following articles, you will find object-oriented, test-driven Java solutions for Advent of Code:

Want Even More Knowledge?

My blog features many articles on Java, software architecture, and performance — from foundational concepts to advanced patterns.

If you want to go deeper, check out my trainings: hands-on, easy to understand, and directly applicable to your day-to-day project work. Instead of theory, I teach principles that help you write code that is better, more maintainable, and more performant in the long run.

Explore the Java Trainings

Search