N-ary tree is defined as a rooted tree which has at most N children for any node. So, a binary tree is a special case of the N-ary tree, where N = 2. We ca implement an N-ary tree using structures or using arrays.
Hello, people! In this post, we will discuss a commonly used data structure to store strings, the Compress Trie Tree, also known as Radix Tree or Patricia (Practical Algorithm to Retrieve Information Coded in Alphanumeric) Tree. If you remember, the problem with a Trie Tree is that it consumes a lot of memory. So, due to […]
Hello people…! In this post I will talk about the Binary Heaps and Heapsort Algorithm implemented using structures and not arrays. This is post is the successor to my previous post on Binary Heaps. Using arrays to code Binary Heaps is very comfortable for the programmer. But it is not fit for the day-to-day applications. […]
Hello people…! In this post I will talk about one of the most versatile data structure in competitive programming, the Segment Tree. Almost in every contest that you do in the major coding websites, at least one question is asked which uses a Segment Tree in its solution. This is because it is easy to […]
Note – Theory of Programming is shifting to YouTube! This post has a video. Watch it at – https://youtu.be/EbamlevPlxY Hoping you’ll support the YouTube channel just like you have greatly supported the website! 🙂 Hello people…! In this post we will talk about the Trie Tree Implementation. Trie Trees are are used to search for all […]
Every programmer needs a suitable data structure to compute some complex function or to do a time-taking task quickly. In this post, I will explain the Binary Indexed Tree (BIT) data structure also known as the Fenwick Tree in post-soviet countries. This data structure is very easy to code in competitions. So, a programmer who […]