Data Structure and Algorithms

Reverse a Linked List — step-by-step Programming tutorial on Progressive Robot

Reverse a Linked List

URL: https://www.progressiverobot.com/reverse-a-linked-list/ Reversing a Linked List is an interesting problem in data structure and algorithms. In this tutorial, we'll be discussing the various algorithms to reverse a [Linked List](/community/tutorials/java-linkedlist-linkedlist-java) and then implement them using Java. Reverse a Linked List LinkedList is a data structure which stores the data in a linear way. Though not in […]

Read more
What is a Balanced Binary Tree and How to Check it? — step-by-step Programming tutorial on Progressive Robot

What is a Balanced Binary Tree and How to Check it?

In case of binary trees, if the trees are skewed, they become computationally inefficient to perform operations on. This is the motivation behind making sure that trees are not skewed. Hence the need for balanced binary trees. What is a Balanced Binary Tree Balanced Binary trees are computationally efficient to perform operations on. A balanced […]

Read more
Tower of Hanoi - Algorithm and Implementation in Java — step-by-step Programming tutorial on Progressive Robot

Tower of Hanoi – Algorithm and Implementation in Java

URL: https://www.progressiverobot.com/tower-of-hanoi/ The Tower of Hanoi is a classic problem in the world of programming. The problem setup consists of three rods/pegs and n disks. The disks can be moved from one peg to another. The n disks are of different sizes. Initially all the disks are stacked on the first tower. The disks are […]

Read more
Binary Search Tree (BST) - Search Insert and Remove — step-by-step Programming tutorial on Progressive Robot

Binary Search Tree (BST) – Search Insert and Remove

In this tutorial, we'll be discussing the Binary Search Tree Data Structure. We'll be implementing the functions to search, insert and remove values from a Binary Search Tree. We'll implement these operations recursively as well as iteratively. Binary Search Tree A Binary Search tree has the following property: All nodes should be such that the […]

Read more
Trie Data Structure in C/C++ — step-by-step Programming tutorial on Progressive Robot

Trie Data Structure in C/C++

URL: https://www.progressiverobot.com/trie-data-structure-in-c-plus-plus/ A Trie data structure acts as a container for a dynamic array. In this article, we shall look at how we can implement a Trie in C/C++. This is based on the tree data structure but does not necessarily store keys. Here, each node only has a value, which is defined based on […]

Read more
Breadth-First Search (BFS) and Depth-First Search (DFS) for Binary Trees in Java — step-by-step Programming tutorial on Progressive Robot

Breadth-First Search (BFS) and Depth-First Search (DFS) for Binary Trees in Java

Breadth-First Search and Depth-First Search are two techniques of traversing graphs and trees. In this tutorial, we will focus mainly on BFS and DFS traversals in trees. What is Depth First Search (DFS)? The algorithm begins at the root node and then it explores each branch before [backtracking](/community/tutorials/n-queens-problem-java-c-plus-plus). It is implemented using stacks. Often while […]

Read more
How to Find Length of a Linked List? — step-by-step Programming tutorial on Progressive Robot

How to Find Length of a Linked List?

What is a Linked List? A linked list is a linear data structure used for storing collections of data Successive elements are connected by pointers The last element points to NULL Each element is a separate object and is called a Node Each node in a linked list comprises of two parts Data Reference to […]

Read more
Height of a Tree Data Structure — step-by-step Programming tutorial on Progressive Robot

Height of a Tree Data Structure

In this tutorial, we'll be discussing Binary Trees. We'll see how to calculate the height of a tree data structure recursively as well as iteratively. Binary Trees Binary Trees are a data structure in which data is stored in a hierarchical manner rather than linear (as it is done in [LinkedList](/community/tutorials/java-linkedlist-linkedlist-java) and Arrays). A Binary […]

Read more
How To Use Lists in Java — step-by-step Programming tutorial on Progressive Robot

How To Use Lists in Java

Learn about Java’s `java.util.List` interface! Discover how it allows you to group and store multiple elements in a collection, and its advanced options for storing and retrieving values.

Read more
CHAT