Data Structure and Algorithms

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
How To Use Maps in Java — step-by-step Programming tutorial on Progressive Robot

How To Use Maps in Java

URL: https://www.progressiverobot.com/how-to-use-maps-in-java/ *The author selected Free and Open Source Fund to receive a donation as part of the Write for DOnations program.* Introduction A map in Java is a group of entries, each with two linked parts – a key and a value. In essence, Map is an interface from the java.util package. To use […]

Read more
Level Order Traversal in a Binary Tree — step-by-step Programming tutorial on Progressive Robot

Level Order Traversal in a Binary Tree

URL: https://www.progressiverobot.com/level-order-traversal-in-a-binary-tree/ Level Order Traversal is one of the methods for traversing across a Binary Tree. In this article, we shall look at how we can implement this algorithm in C/C++. But before that, let us have our concepts covered. Building the concepts A Binary Tree is a data structure where every node has at-most […]

Read more
Linear Search Algorithm and Implementation in C — step-by-step Programming tutorial on Progressive Robot

Linear Search Algorithm and Implementation in C

URL: https://www.progressiverobot.com/linear-search-algorithm-c/ Linear Search is basically a sequential search algorithm. In this algorithm, the key element is searched in the given input [array](/community/tutorials/arrays-in-c) in sequential order. If the key element is found in the input array, it returns the element. Linear Search Algorithm Linear_Search ( Array X, Value i) Set j to 1 If j […]

Read more
Max Heap Data Structure Implementation in Java — step-by-step Programming tutorial on Progressive Robot

Max Heap Data Structure Implementation in Java

URL: https://www.progressiverobot.com/max-heap-java/ A max heap is a complete binary tree in which the value of a node is greater than or equal to the values of its children. Max Heap data structure is useful for sorting data using heap sort. In this tutorial, we will cover everything you need to know to implement max heaps […]

Read more
CHAT