Ayush Singh has Published 179 Articles

Shortest path in a graph from a source S to destination D with exactly K edges for multiple Queries

Ayush Singh

Ayush Singh

Updated on 17-Jul-2023 11:54:14

306 Views

Finding the shortest route between a source vertex and a target vertex in a graph with precisely K edges is one of the most typical graph traversal issues. The objective is to find the shortest path with minimum weight and exactly K edges. This issue can manifest in a number ... Read More

Minimum Number of Colours Required to Colour a Graph

Ayush Singh

Ayush Singh

Updated on 17-Jul-2023 11:52:55

448 Views

The Minimum Number of Colours Required to Colour a Graph is a fundamental graph theory issue that includes colouring vertices so that no two neighbouring vertices have the same colour. Determine the least amount of colours needed for a valid colouring.Greedy Colouring is a simple and commonly used technique that ... Read More

Breadth First Search without using Queue

Ayush Singh

Ayush Singh

Updated on 17-Jul-2023 10:06:09

338 Views

Breadth To begin with, Look (BFS) may be a chart traversal calculation utilised to investigate hubs in a chart in a breadthward movement. The normal usage of BFS utilises a line information structure to keep track of hubs to come. In any case, it is conceivable to execute BFS without ... Read More

Minimum Cost to Reverse Edges such that there is Path Between Every Pair of Nodes

Ayush Singh

Ayush Singh

Updated on 14-Jul-2023 10:51:33

196 Views

The minimum cost to invert edges in order to have a way between each match of hubs alludes to finding the slightest costly way to alter the course of edges in a chart. The objective is to guarantee that there's a way to interconnect any two hubs within the chart. ... Read More

Minimum Colors Required such that Edges Forming Cycle do Not have Same Color

Ayush Singh

Ayush Singh

Updated on 14-Jul-2023 10:48:59

50 Views

To reduce the number of colours needed and to avoid having the edges form a cycle with the same colour, you can use a chart colouring approach. The goal is to map colours to vertices such that no two adjacent vertices connected by an edge have the same colour. By ... Read More

Maximum number of edges that N-vertex graph can have such that graph is Triangle free| Mantel’s Theorem

Ayush Singh

Ayush Singh

Updated on 14-Jul-2023 10:46:59

117 Views

The concept of a triangle−free graph, in which no collection of three vertices forms a triangle, is crucial to the study of graph theory. It's amazing to consider how many edges an N−vertex graph may have and yet be triangle−free. Mantel's theorem offers the elegant solution to this issue.The maximum ... Read More

Minimum Value of Distance of Farthest Node in a Graph

Ayush Singh

Ayush Singh

Updated on 14-Jul-2023 10:45:28

228 Views

The goal here is to determine the path with the fewest hops from a given starting point to the endpoint of the whole graph. This distance may be computed using a variety of methods, including those specifically designed for graph traversal (like Breadth−First Search) and shortest path discovery (like Dijkstra's ... Read More

Minimum Spanning Tree using Priority Queue and Array List

Ayush Singh

Ayush Singh

Updated on 14-Jul-2023 10:44:04

378 Views

To discover the least crossing tree of a chart, be ready to utilise a combination of a need line and a cluster list. To begin with, we initialise the need line with the edges of the chart, sorted by their weights in climbing order. At that point, we make a ... Read More

Minimum Number of Edges that Need to be Added to form a Triangle

Ayush Singh

Ayush Singh

Updated on 14-Jul-2023 10:41:16

49 Views

To determine the least number of edges required to make a triangle in a chart, we analyse the network between the hubs. In cases where three hubs are associated specifically or in a roundabout way through edges, a triangle can be shaped. The minimum number of edges required is equal ... Read More

Print all Neighbour Nodes Within Distance K

Ayush Singh

Ayush Singh

Updated on 14-Jul-2023 10:38:15

77 Views

To determine if an associated chart exists that fulfils the given conditions, we can utilise a basic approach. The conditions state that the chart must have at least one hub with an odd degree and all other hubs must have an indeed degree. We are able to make such a ... Read More

Advertisements