Arnab Chakraborty has Published 4293 Articles

Find pairs with given sum such that pair elements lie in different BSTs in Python

Arnab Chakraborty

Arnab Chakraborty

Updated on 19-Aug-2020 11:03:13

136 Views

Suppose we have two given Binary Search Trees and another sum is given; we have to find pairs with respect of given sum so that each pair elements must be in different BSTs.So, if the input is like sum = 12then the output will be [(6, 6), (7, 5), (9, ... Read More

Find pairs with given sum such that elements of pair are in different rows in Python

Arnab Chakraborty

Arnab Chakraborty

Updated on 19-Aug-2020 11:00:13

185 Views

Suppose we have a matrix of unique elements and a sum; we have to find all the pairs from the matrix whose sum is equal to given sum. Here, each element of pair will be taken from different rows.So, if the input is like −24356987101114121311516sum = 13, then the output ... Read More

Segment Trees in Data Structure

Arnab Chakraborty

Arnab Chakraborty

Updated on 11-Aug-2020 07:52:15

550 Views

In this section we will see what is the segment tree. Before discussing that, let us see one problem.Suppose we have an array arr[0, …, n-1], We can do following operations −Find the sum of elements from index l to r, where 0 ≤ l ≤ r ≤ n-1Change the ... Read More

Interval Trees in Data Structure

Arnab Chakraborty

Arnab Chakraborty

Updated on 11-Aug-2020 07:50:46

2K+ Views

In this section we will see what is the interval tree. As the name suggests, that the interval trees are the trees which are associated with the intervals. So before discussing about the interval trees, let us see the elementary intervals.An interval is basically a range. So if one interval ... Read More

B+ tree Deletion in Data Structure

Arnab Chakraborty

Arnab Chakraborty

Updated on 11-Aug-2020 07:47:36

900 Views

Here we will see, how to perform the deletion of a node from B+ Tree. Suppose we have a B+ Tree like below 7minus;Example of B+ Tree −Deletion has two parts. At first we have to find the element. That strategy is like the querying. Now for deletion, we have ... Read More

B-tree Deletion in Data Structure

Arnab Chakraborty

Arnab Chakraborty

Updated on 11-Aug-2020 07:31:37

1K+ Views

Here we will see, how to perform the deletion of a node from B-Tree. Suppose we have a BTree like below −Example of B-Tree −Deletion has two parts. At first we have to find the element. That strategy is like the querying. Now for deletion, we have to care about ... Read More

B-tree Query in Data Structure

Arnab Chakraborty

Arnab Chakraborty

Updated on 11-Aug-2020 07:27:13

740 Views

Here we will see, how to perform the searching in B-Tree. The B-Tree searching is also known as B-Tree Querying. Suppose we have a B-tree like below −Example of B-Tree −The searching technique is very similar to the binary search tree. Suppose we want to search 66 from the above ... Read More

B-tree Insertion in Data Structure

Arnab Chakraborty

Arnab Chakraborty

Updated on 11-Aug-2020 07:25:53

829 Views

Here we will see, how to perform the insertion into a B-Tree. Suppose we have a B-Tree like below −Example of B-Tree −To insert an element, the idea is very similar to the BST, but we have to follow some rules. Each node has m children, and m-1 elements. If ... Read More

Interval Heaps in Data Structure

Arnab Chakraborty

Arnab Chakraborty

Updated on 11-Aug-2020 07:19:04

1K+ Views

Here we will see what is the interval heaps. The interval heaps are complete binary tree, in which, each node except possibly the last one contains two elements. Let the priorities of two elements in node P are ‘a’ and ‘b’. Here we are considering a ≤ b. We say ... Read More

Max WBLT Operations in Data Structure

Arnab Chakraborty

Arnab Chakraborty

Updated on 11-Aug-2020 07:18:05

255 Views

Here we will see what are the different Max-WBLT operations. The HBLT has different operations like insert, delete, and initializations. They are quite similar to the WBLT also. However, the meld operation can be done in a single top-to-bottom pass.A single pass meld operation is possible for WBLT. Because we ... Read More

Advertisements