Arnab Chakraborty

Arnab Chakraborty

3,768 Articles Published

Articles by Arnab Chakraborty

Page 350 of 377

Rooted vs Unrooted Trees in Data Structure

Arnab Chakraborty
Arnab Chakraborty
Updated on 11-Aug-2020 3K+ Views

In this section we will see what are the differences between rooted and the unrooted trees. At first we will see some examples of Rooted, and Unrooted trees.Example of Rooted Tree −Example of Unrooted Tree −Basic Differences between rooted and Unrooted treesIn a rooted tree, each node with descendants represents the inferred most recent common ancestors of the descendants. In some trees, the edge lengths may be interpreted as time estimates.For the unrooted trees, there is no ancestral root. Unrooted trees represent the branching order, but do not indicate the root of the location of the last common ancestor.

Read More

Unrooted binary tree in Data Structure

Arnab Chakraborty
Arnab Chakraborty
Updated on 11-Aug-2020 709 Views

Here we will see the what is the unrooted binary tree. These trees are connected undirected graph with no cycle. The vertices with one neighbor are the leaves of the tree. Remaining vertices are internal nodes. The degree of the vertices is its number of neighbors. In a tree with more than one node, the leaves are the vertices of degree one.Free tree is one type of binary tree, where all internal nodes have exactly degree three. In Computer Science, binary trees are often rooted, and ordered, when they are used as data structures, but the applications of unrooted binary ...

Read More

Tournament Trees, Winner Trees and Loser Trees in Data Structure

Arnab Chakraborty
Arnab Chakraborty
Updated on 11-Aug-2020 10K+ Views

Here we will see the Tournament trees, Winner and Looser trees. The Tournament tree is a complete binary tree with n external nodes and n – 1 internal nodes. The external nodes represent the players, and the internal nodes are representing the winner of the match between the two players. This tree is also known as Selection tree.There are some properties of Tournament trees. These are like below −This tree is rooted. So the link in the tree and directed path from parent to children, and there is a unique element with no parentsThe parent value is less or equal ...

Read More

Prefix and Postfix Expressions in Data Structure

Arnab Chakraborty
Arnab Chakraborty
Updated on 11-Aug-2020 34K+ Views

The way to write arithmetic expression is known as a notation. An arithmetic expression can be written in three different but equivalent notations, i.e., without changing the essence or output of an expression. These notations are –InfixPrefixPostfixInfix notations are normal notations, that are used by us while write different mathematical expressions. The Prefix and Postfix notations are quite different.Prefix NotationIn this notation, operator is prefixed to operands, i.e. operator is written ahead of operands. For example, +ab. This is equivalent to its infix notation a + b. Prefix notation is also known as Polish Notation.Postfix NotationThis notation style is known ...

Read More

Circular queues-Insertion and deletion operations in C++

Arnab Chakraborty
Arnab Chakraborty
Updated on 11-Aug-2020 12K+ Views

A queue is an abstract data structure that contains a collection of elements. Queue implements the FIFO mechanism i.e the element that is inserted first is also deleted first.Queue cane be one linear data structure. But it may create some problem if we implement queue using array. Sometimes by using some consecutive insert and delete operation, the front and rear position will change. In that moment, it will look like the queue has no space to insert elements into it. Even if there are some free spaces, that will not be used due to some logical problems. To overcome this ...

Read More

R-trees in Data Structure

Arnab Chakraborty
Arnab Chakraborty
Updated on 11-Aug-2020 4K+ Views

Here we will see the R-Trees data structure. The R-Trees are used to store special data indexes in an efficient manner. This structure is very useful to hold special data queries and storages. This R-trees has some real life applications. These are like below −Indexing multidimensional informationHandling game dataHold geospatial coordinatesImplementation of virtual mapsOne example of R-Tree is like below.Corresponding R-tree is like below −Properties of R-TreesR-Trees are made of with single root, internal and leaf nodesThe root has a pointer to the largest region in the special domainThe parent nodes will hold child nodes where child nodes completely overlap ...

Read More

Merge Algorithms in Data Structure

Arnab Chakraborty
Arnab Chakraborty
Updated on 11-Aug-2020 873 Views

The Merge algorithm is used to merge two sorted list into one list. This algorithm is used in different cases. If we want to perform merge sort, then we need to merge the sorter lists into larger lists.The approach is simple. We take two lists, there will be two pointers. The first one will point to the element of the fist list, second one will point to the elements of the second list. Based on their values, the smaller element is taken from one of these two lists, then increase the pointer of that corresponding list. This operation will be ...

Read More

Binary Trees as Dictionaries in Data Structure

Arnab Chakraborty
Arnab Chakraborty
Updated on 11-Aug-2020 1K+ Views

When we try to implement abstract data type Dictionary, then the node associates with values. A dictionary is basically a set of keys, which must be elements drawn from a total ordering. There may be additional information, which are associated with each key, but it does not lead to any conceptual comprehension.If the dictionary is implemented using trees, then each node will hold unique keys. Here for each node u in the tree, every key is u.l is strictly smaller than u.k. And every key in u.r, is strictly larger than u.k. A tree is organized according to this invariant ...

Read More

Robin-Hood Hashing in Data Structure

Arnab Chakraborty
Arnab Chakraborty
Updated on 11-Aug-2020 505 Views

In this section we will see what is Robin-Hood Hashing scheme. This hashing is one of the technique of open addressing. This attempts to equalize the searching time of element by using the fairer collision resolution strategy. While we are trying to insert, if we want to insert element x at position xi, and there is already an element y is placed at yj = xi, then the younger of two elements must move on. So if i ≤ j, then we will try to insert x at position xi+1, xi+2 and so on. Otherwise we will store x at ...

Read More

LCFS Hashing in Data Structure

Arnab Chakraborty
Arnab Chakraborty
Updated on 11-Aug-2020 588 Views

In this section we will see what is LCFS Hashing. This is one of the open-addressing strategy, that changes the collision resolution strategy. If we check the algorithms for the hashing in open address scheme, we can find that if two elements collide, then whose priority is higher, will be inserted into the table, and subsequent element must move on. So we can tell that the hashing in open addressing scheme is FCFS criteria.With the LCFS (Last Come First Serve) scheme. The task is performed exactly in opposite way. When we insert one element, that will be placed at position ...

Read More
Showing 3491–3500 of 3,768 articles
« Prev 1 348 349 350 351 352 377 Next »
Advertisements