Arnab Chakraborty has Published 4293 Articles

Find duplicate rows in a binary matrix in C++

Arnab Chakraborty

Arnab Chakraborty

Updated on 03-Jan-2020 09:58:19

180 Views

Suppose we a binary matrix. Here we will see how to find the duplicate rows in that matrix. Suppose the matrix is like −110101001001101100110101001001001001There are duplicate rows at position 3, 4, 5.To solve this, we will use the Trie. The Trie is an efficient data structure used for strong and ... Read More

Find alphabet in a Matrix which has maximum number of stars around it in C++

Arnab Chakraborty

Arnab Chakraborty

Updated on 03-Jan-2020 09:54:16

207 Views

Suppose we have a matrix M. This is filled with stars and letters. We have to find which letter has maximum number of stars around it. So if the matrix is like below −Here A and C has 7 stars around it. this is maximum. As A is lexicographically smaller, ... Read More

Find a triplet such that sum of two equals to third element in C++

Arnab Chakraborty

Arnab Chakraborty

Updated on 03-Jan-2020 09:50:15

517 Views

Suppose there is an array of n numbers. We have to find three numbers, such that sum of two elements is same as the third one. So if the array is like [5, 32, 1, 7, 10, 50, 19, 21, 2], the output will be 21, 2, 19. If no ... Read More

Find a specific pair in Matrix in C++

Arnab Chakraborty

Arnab Chakraborty

Updated on 03-Jan-2020 09:47:16

354 Views

Suppose there is an n x n matrix mat of integers. we have to find maximum value of mat(c, d) - mat(a, b) over all choices of indexes. Here we have to keep in mind that c > a and d > b. So if the matrix is like −12-1-4-20-8-342138613-4-117-60-410-51The ... Read More

Find a palindromic string B such that given String A is a subsequence of B in C++

Arnab Chakraborty

Arnab Chakraborty

Updated on 03-Jan-2020 09:44:13

212 Views

Suppose we have a string A, we have to find another string B, that will be palindrome. And the given string A will be subsequence of B. The subsequence of a string is a string that can be formed by it by deleting some characters without changing the order of ... Read More

Find a common element in all rows of a given row-wise sorted matrix in C++

Arnab Chakraborty

Arnab Chakraborty

Updated on 03-Jan-2020 09:40:19

330 Views

Suppose we have a matrix where each row is sorted. We have to write a function that will find the common elements in each row. Suppose the matrix is like below −The result will be 5.To solve this, we will use hash based approach. This approach can also be used ... Read More

Multi-Way Trees

Arnab Chakraborty

Arnab Chakraborty

Updated on 03-Jan-2020 06:14:24

16K+ Views

A multiway tree is defined as a tree that can have more than two children. If a multiway tree can have maximum m children, then this tree is called as multiway tree of order m (or an m-way tree).As with the other trees that have been studied, the nodes in ... Read More

Multidimensional Binary Search Trees

Arnab Chakraborty

Arnab Chakraborty

Updated on 03-Jan-2020 06:10:57

2K+ Views

Basic conceptThe multidimensional binary search tree (abbreviated k-d tree) is defined as a data structure for storing multikey records. This structure has been implemented to solve a number of "geometric" problems in statistics and data analysis.A k-d tree (short for k-dimensional tree) is defined as a space-partitioning data structure for ... Read More

Rebalancing Algorithms

Arnab Chakraborty

Arnab Chakraborty

Updated on 03-Jan-2020 06:00:47

795 Views

The rebalancing Algorithms can be performed in following way −Day-Stout-Warren AlgorithmWe can implement actually rebalance method using the Day-Stout-Warren Algorithm.It's linear in the number of nodes.The following is a presentation of the basic DSW Algorithm in pseudo code.A node is allocated called as the "pseudo-root" and make the tree's actual ... Read More

Blocked Bloom Filter

Arnab Chakraborty

Arnab Chakraborty

Updated on 03-Jan-2020 05:59:33

980 Views

We select a memory block first.Then we select local Bloom Filter within each block.It might cause imbalance between memory blocksThis filter is efficient, but poor false positive rate(FPR).At first instance, blocked Bloom filters should have the same FPR (False Positive Rate) as standard Bloom filters of the same size.Blocked Bloom ... Read More

Advertisements