Data Structure and Algorithms

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
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
N-Queens problem using backtracking in Java/C++ — step-by-step Programming tutorial on Progressive Robot

N-Queens problem using backtracking in Java/C++

URL: https://www.progressiverobot.com/n-queens-problem-java-c-plus-plus/ If you love playing chess, you'll enjoy learning about the N-queens problem. It is a good problem to understand backtracking. What is Backtracking? In backtracking, we start with one pos­si­ble move out of many avail­able moves. We then try to solve the prob­lem. If we are able to solve the prob­lem with the […]

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
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
Min Heap Binary Tree — step-by-step Programming tutorial on Progressive Robot

Min Heap Binary Tree

URL: https://www.progressiverobot.com/min-heap-binary-tree/ A Min Heap Binary Tree is a Binary Tree where the root node has the minimum key in the tree. The above definition holds true for all sub-trees in the tree. This is called the Min Heap property. Almost every node other than the last two layers must have two children. That is, […]

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
CHAT