
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Found 1860 Articles for Data Structure

172 Views
Introduction Binary matrices are widely used in computer science and various fields to represent data or solve complex problems efficiently. In some cases, it becomes important to identify whether a given binary matrix contains continuous blocks of zeros. In this article, we will explore an elegant solution using C++ code that allows us to detect if there are T number of continuous blocks of zeroes within a given binary matrix. This approach is both intuitive and efficient, making it suitable for practical implementation. Check if there are T number of continuous of blocks of 0s or not Given ... Read More

203 Views
Introduction Binary trees are fascinating data structures that have numerous applications in computer science and programming. One interesting problem is finding the count from the given tree composed of a parent along with its child nodes. The Binary tree is composed of nodes and the root node is decided and from which the child nodes can be given according the user need. The K value is decided and the way it traverses is chosen by the M value. Count of Root to Leaf Paths The graph is created with various nodes holding the values in form of ... Read More

549 Views
The term "sum of all pair shortest paths" in a tree refers to calculating the total of all node pairs' individual shortest paths. An effective way to do this is to use the Double DFS (Depth-First Search) algorithm. Determine the separation between a chosen node and every other node during the first DFS pass. Once more traverse the tree during the second DFS pass, taking into account each node as a potential LCA (Lowest Common Ancestor), and add up the distances between pairs of nodes that are descendants of the chosen LCA. The sum of all pair shortest paths in ... Read More

258 Views
Subset Correspondence, otherwise called the "Subset Total" issue, is an exemplary NP-complete computational issue. Given a bunch of numbers and an objective worth, the undertaking is to decide if there exists a subset of the numbers whose total is equivalent to the objective worth. The issue's NP-culmination emerges from its capacity to address an extensive variety of other NP-complete issues through polynomial-time decreases. Regardless of its straightforward definition, no realized effective calculation can tackle "Subset Correspondence" for all occurrences, making it of critical interest in hypothetical software engineering and streamlining, with functional applications in different fields, like cryptography, asset distribution, ... Read More

258 Views
Set Parcel is a NP-complete issue in which the errand is to decide if a given arrangement of positive whole numbers can be separated into two subsets with equivalent totals. NP-culmination suggests that there is no known polynomial-time calculation to tackle it for all occurrences, and confirming a potential arrangement should be possible in polynomial time. Numerous other NP-complete issues can be decreased to Set Segment, exhibiting its computational intricacy and its significance in understanding the more extensive class of NP-complete issues. Because of its intricacy, tackling enormous cases of the Set Segment issue might demand dramatic investment, making it ... Read More

327 Views
The following queries can be used to determine how many connected components remain after a tree vertex is removed: Start by taking the tree structure into account. Then, by moving through the tree using breadth- or depth-first search algorithms, examine each connected component. Utilise the same traversal method to decide the number of connected components once the desired vertex has been expelled. The result will be decided by the variation between the counts before and after the expulsion. This method effectively monitors connectivity changes and aids in counting the connected components in the updated tree. Methods Used ... Read More

359 Views
An effective library for modelling and analysing intricate networks and graphs is Python NetworkX. The term "Tutte Graph" refers to a unique class of graphs that W. T. Tutte found. It entails the use of the library's features to implement and investigate Tutte Graphs in the context of Python NetworkX. Tutte Graphs have special characteristics and can be used to address a variety of graph-theoretical issues. Users can learn more about these graphs' structural properties and applications by examining them with NetworkX, which will help them better comprehend graph theory and its applications. Tutte Graph Every face of ... Read More

289 Views
In a coordinated diagram, recognizing hubs that are not piece of any cycle is critical for different applications. These hubs structure the underpinning of non-cyclic subgraphs and assume a huge part in understanding the general chart structure. By using effective chart crossing calculations, for example, Profundity First Hunt (DFS) or Tarjan's calculation for firmly associated parts, we can without much of a stretch decide and print the hubs that are not engaged with any cycle. These methodologies guarantee that hubs with no cycle cooperation are featured, giving important bits of knowledge into the diagram's non-cyclic parts and supporting different chart ... Read More

273 Views
The "Upgraded Longest Way" issue is a computationally difficult undertaking, ordered as NP-complete. In this issue, given a diagram with weighted edges, the goal is to find the longest way from a predetermined beginning hub to a closure hub while expanding the amount of edge loads. Because of the remarkable development in possible ways to investigate, no known polynomial-time calculation can tackle this issue productively for all cases. All things considered, scientists resort to surmised calculations and heuristics to track down close ideal arrangements. The trouble of this issue has reasonable ramifications in different fields, like transportation, planned operations, and ... Read More

212 Views
Tracking down the most modest number of characters that should be changed to transform a given string into a link of K-length palindromic substrings is a common issue in the field of string control. A string that peruses similar advances and in reverse is known as a palindromic string. Examples are "radar" or "level." The fundamental ideas, methods, and potential optimization strategies that can be used to effectively address this issue will all be covered in this article. By the conclusion, readers will be able to handle similar string manipulation issues since they will have a comprehensive understanding of the ... Read More