Articles on Trending Technologies

Technical articles with clear explanations and examples

C++ Largest Subtree having Equal No of 1's and 0's

Prateek Jangid
Prateek Jangid
Updated on 25-Nov-2021 247 Views

Given a binary tree. Now we are tasked to find the largest subtree having an equal number of 1's and 0's; the tree only contains 0's and 1's.Approach to Find the SolutionIn this approach, we are going to replace all the nodes with values of 0 to -1. Doing this will make our program simpler as we now need to find the largest subtree with a sum equal to 0.ExampleC++ Code for the Above Approach  #include using namespace std; int maxi = -1; struct node { // structure of our tree node     int data;     struct ...

Read More

C++ Program to find the Largest Divisible Subset in Array

Prateek Jangid
Prateek Jangid
Updated on 25-Nov-2021 358 Views

This tutorial will discuss a problem where we are given an array of distinct positive integers. We need to find the largest subset such that for every pair larger element is divided by a smaller element, for example −Input: nums[ ] = { 1, 4, 2, 6, 7} Output: 1 2 4 Explanation: All Divisible subsets are: (1, 2, 4), (1, 2, 6), (1, 7), etc We have 2 subsets of length 3 in which all the pairs satisfy the condition. Input: nums[ ] = { 1, 2, 3, 6 } Output: 6 2 1Approach to Find the SolutionThere ...

Read More

What are the challenges regarding the construction and utilization of spatial data warehouses?

Ginni
Ginni
Updated on 25-Nov-2021 342 Views

There are several challenging issues regarding the construction and utilization of spatial data warehouses. The first challenge is the unification of spatial information from heterogeneous sources and systems. Spatial data are usually stored in different industry firms and government agencies using various data formats.Data formats are not only structure-specific (e.g., raster- vs. vector-based spatial data, object-oriented vs. relational models, different spatial storage and indexing structures), but also vendor-specific (e.g., ESRI, MapInfo, Intergraph). There has been huge work on the unification and exchange of heterogeneous spatial data, which has paved the way for spatial data integration and spatial data warehouse construction.The ...

Read More

C++ Program to find the Largest Divisible Pairs Subset

Prateek Jangid
Prateek Jangid
Updated on 25-Nov-2021 286 Views

To solve a problem in which we are given an array consisting of distinct elements. Now our task is to find the subset such that every pair is evenly divisible, i.e, every large element is divisible by every smaller element, for example.Input : arr[] = {10, 5, 3, 15, 20} Output : 3 Explanation: The largest subset is 10, 5, 20. 10 is divisible by 5, and 20 is divisible by 10. Input : arr[] = {18, 1, 3, 6, 13, 17} Output : 4 Explanation: The largest subset is 18, 1, 3, 6, In the subsequence, 3 is ...

Read More

What is Spatial Data Mining?

Ginni
Ginni
Updated on 25-Nov-2021 27K+ Views

A spatial database saves a huge amount of space-related data, including maps, preprocessed remote sensing or medical imaging records, and VLSI chip design data. Spatial databases have several features that distinguish them from relational databases. They carry topological and/or distance information, usually organized by sophisticated, multidimensional spatial indexing structures that are accessed by spatial data access methods and often require spatial reasoning, geometric computation, and spatial knowledge representation techniques.Spatial data mining refers to the extraction of knowledge, spatial relationships, or other interesting patterns not explicitly stored in spatial databases. Such mining demands the unification of data mining with spatial database ...

Read More

Can inherited properties of objects be generalized?

Ginni
Ginni
Updated on 25-Nov-2021 296 Views

An object identifier can be generalized as follows. First, the object identifier is generalized to the identifier of the lowest subclass to which the object belongs. The identifier of this subclass can then, in turn, be generalized to a higher level class/subclass identifier by climbing up the class/subclass hierarchy. Similarly, a class or a subclass can be generalized to its corresponding superclass (es) by climbing up its associated class/subclass hierarchy.Because object-oriented databases are organized into class/subclass hierarchies, some attributes or methods of an object class are not explicitly specified in the class but are inherited from higher-level classes of the ...

Read More

Numbers that are Bitwise AND of At Least One Non-Empty Sub-Array using C++

Prateek Jangid
Prateek Jangid
Updated on 25-Nov-2021 216 Views

To solve a problem where we are given an array, and we need to find all possible integers which are bitwise AND of at least one not empty subarray, for example −Input : nums[ ] = { 3, 5, 1, 2, 8 } Output : { 2, 5, 0, 3, 8, 1 } Explanation: 2 is the bitwise AND of subarray {2}, 5 is the bitwise AND of subarray {5}, 0 is the bitwise AND of subarray {1, 2}, {2, 8} and {1, 2, 8}, 3 is the bitwise AND of subarray {3}, 8 is the bitwise AND of subarray ...

Read More

C++ Program to find Numbers in a Range with Given Digital Root

Prateek Jangid
Prateek Jangid
Updated on 25-Nov-2021 315 Views

The sum of its digit can find the digital root of a number; if the sum is a single digit, it is a digital root. In this tutorial, we will discuss a problem where we are given a range of numbers and an integer X, and we need to count how many numbers in the range have digital roots as X where X is a single-digit number, for exampleInput: l = 13, r = 25, X = 4 Output: 2 Explanation: Numbers in the range (13, 25) having digit sum 4 are 13 and 22. Input: l = 11, ...

Read More

What is Multi-relational Clustering?

Ginni
Ginni
Updated on 25-Nov-2021 660 Views

Multi-relational clustering is the process of partitioning data objects into a set of clusters based on their similarity, utilizing information in multiple relations. In this section, it can introduce CrossClus (Cross-relational Clustering with user guidance), an algorithm for multi-relational clustering that explores how to utilize user guidance in clustering and tuple ID propagation to avoid physical joins.There is one major challenge in multi-relational clustering is that there are too many attributes in different relations, and usually, only a small portion of them are relevant to a specific clustering task.Consider the computer science department database. It can order to cluster students, ...

Read More

C++ Program to find Number Whose XOR Sum with Given Array is a Given Number k

Prateek Jangid
Prateek Jangid
Updated on 25-Nov-2021 537 Views

To solve a problem in which, given, we are tasked to find the number such that the XOR sum of a given array with that number becomes equal to k, for example.Input: arr[] = {1, 2, 3, 4, 5}, k = 10 Output: 11 Explanation: 1 ^ 2 ^ 3 ^ 4 ^ 5 ^ 11 = 10 Input: arr[] = { 12, 23, 34, 56, 78 }, k = 6 Output: 73In this program, we are going to use the property of xor if A^B = C and A^C = B, and we are going to apply this ...

Read More
Showing 46941–46950 of 61,297 articles
Advertisements