Pranavnath has Published 448 Articles

Finding All Occurrences of a substring in a Python string

Pranavnath

Pranavnath

Updated on 25-Aug-2023 13:34:30

2K+ Views

The strings are composed of characters and initialized in the code using simple or double quotes and substring is also a character present inside a string. Python is a versatile and high-level language that can be understood easily by the user. In this article, all the occurrences of the substring ... Read More

Why does Dijkstra's Algorithm fail on negative weights?

Pranavnath

Pranavnath

Updated on 25-Aug-2023 11:20:58

228 Views

Introduction Dijkstra's algorithm could be a broadly utilized graph traversal algorithm that finds the shortest way between two vertices in a graph. It is effective and ensures ideal comes about when connected to graphs with non-negative weights. In any case, when negative weights are presented, Dijkstra's algorithm comes up short ... Read More

Find Maximum Shortest Distance in Each Component of a Graph

Pranavnath

Pranavnath

Updated on 25-Aug-2023 11:18:54

54 Views

Introduction In C language, finding the most extreme briefest separate in each component of a chart may be a vital assignment. The chart is spoken to utilizing a contiguousness list or lattice. By utilizing Breadth-First Search (BFS) or Depth-First Look (DFS), we will compute the most limited separations from each ... Read More

Count the number of nodes in a Graph whose sum of neighbours is at most K

Pranavnath

Pranavnath

Updated on 25-Aug-2023 11:18:03

132 Views

Introduction Undirected graphs are an essential component of computer science and graph theory, representing a set of vertices connected by edges without any directionality. One common problem associated with undirected graphs is the counting the number of nodes in a graph whose sum of neighbours is at most K. In ... Read More

Difference between Minimum Spanning Tree and Shortest Path

Pranavnath

Pranavnath

Updated on 25-Aug-2023 11:16:37

705 Views

Introduction The Minimum Spanning tree and the shortest tree plays a vital role in the field of graph theory to design the networks. While they share similarities as fundamental concepts, their purposes diverge significantly. In this article, we will dive into these two interesting elements within graphs and highlight their ... Read More

Graph Homomorphism

Pranavnath

Pranavnath

Updated on 25-Aug-2023 11:15:22

97 Views

Introduction Graph homomorphism may be a crucial concept in chart hypothesis and computational science. Within the setting of C dialect, a chart homomorphism may be a mapping between two charts that jam the contiguousness connections between their vertices. It is frequently spoken to as a work that allocates vertices from ... Read More

Check if a cycle between nodes S and T in an Undirected Graph with only S and T repeating

Pranavnath

Pranavnath

Updated on 25-Aug-2023 11:13:07

54 Views

Introduction Graphs are powerful mathematical structures that allow us to model and visualize relationships between various entities. In computer science, graphs find application in a wide range of algorithms and data structures. One common problem with undirected graphs is determining whether a cycle exists between two given nodes. In this ... Read More

Construct a Graph from size of components for each node

Pranavnath

Pranavnath

Updated on 25-Aug-2023 11:11:35

104 Views

Introduction Graph theory is a fundamental field in computer science, allowing us to study and visualize relationships between objects or entities. One important aspect of analyzing graphs understands the sizes of components or connected subgraphs within the network. In this article, we will explore how to construct a graph from ... Read More

Traverse in lexicographical order using DFS

Pranavnath

Pranavnath

Updated on 25-Aug-2023 11:10:35

219 Views

Introduction Graph traversal could be a principal operation in computer science that includes going by all nodes of a graph. In certain scenarios, it may be fundamental to navigate the graph in the lexicographical order of nodes, which suggests going by the nodes in climbing numerical order. In this article, ... Read More

Smallest set vertices to visit all nodes of the given Graph

Pranavnath

Pranavnath

Updated on 25-Aug-2023 11:09:42

53 Views

Introduction Finding the smallest set of vertices to visit all nodes in a graph could be a crucial issue in graph hypothesis. It has practical applications in different areas, counting network optimization, directing algorithms, and task planning. In this article, we are going investigate three diverse approaches to illuminate this ... Read More

Advertisements