Graph (4) -------------(3) / \ / \ (5)------------(1)-----------(2) in This Above graph 4 connected to 3 and 5. Then 3 connected to 2 and 4 and so on. Graph are Used To Various Algorithms and Technology for example, Shortest Path Algorithm. 1.Graph. 2.bidirectional Graph. 3.Weighted Graph. Bidirectional Graph We Can Travel Both Side . Like Two Way Road. S======>E and E<=====S (start to end and end to start) vice versa. Weighted Graph Weighted Graph Have Length Of Path. Like Km Is Roadways. Properties vertex edge Vertex is a defined as start or end point. Edge is a connection between start and end points import java.util.*; class graph< T >{ HashMap < T , LinkedList < T >> g= new HashMap < T , LinkedList < T >>(); publ
dsaJavaCpp Is a Personnel Blog To Learn Basic Programming Data structures and Algorithms For Develop My Programming Skills And Prepare coding Interview. The Blog Contains Basic Algorithms Such As, Divide and Con quire, Linear And non Linear Data Structures.